[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnucap-devel] gnucap build with CMake on Windows
From: |
Felix Salfelder |
Subject: |
Re: [Gnucap-devel] gnucap build with CMake on Windows |
Date: |
Fri, 28 Jun 2019 20:42:43 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Fri, Jun 28, 2019 at 03:36:30PM +0200, Patrick Mulder wrote:
> This can be solved by putting the dll in the same path as the modelgen.exe
> - so this works now
Hi Patrick
good you figured out this one, i think it requires some cmake skills to
fix this properly, if possible.
> but running the diode compile i get an empty map in
> this constructor:
what exactly do you mean? is it a compiler error? a warning is expected,
but the warning you get with (newer?) g++ can be safely ignored.
could you quote the complete error, please?
> class DISPATCHER_BASE {
> protected:
> std::map<std::string, CKT_BASE*> * _map; // (*)
> private:
> explicit DISPATCHER_BASE(DISPATCHER_BASE*) {unreachable();incomplete();}
> public:
> DISPATCHER_BASE() /*: _map(new std::map<std::string, CKT_BASE*>)*/ {
> if (!_map) {
> _map = new std::map<std::string, CKT_BASE*>;
> }else{unreachable();
> puts("build error: link order: constructing dispatcher that already
> has contents\n");
> }
>
> How does the map init to work?
currently, all dispatcher instances are static. static objects are
initialised to zero (i.e. when they are copied to the stack). hence the
map pointer (*) is NULL at the beginning. in the normal (intended) case,
you simply get a new map when the dispatcher is constructed.
the other, unreachable, branch reports a linking problem. It happens on
some BSD(?), and afaik it should not show up on M$/mingw. Sometimes
things still seem to work properly, in case you see the error message.
the code looks a bit weird because it tries to handle this gracefully.
hth
felix
- [Gnucap-devel] gnucap build with CMake on Windows, Patrick Mulder, 2019/06/28
- Re: [Gnucap-devel] gnucap build with CMake on Windows, Patrick Mulder, 2019/06/28
- Re: [Gnucap-devel] gnucap build with CMake on Windows,
Felix Salfelder <=
- Re: [Gnucap-devel] gnucap build with CMake on Windows, Christian Gagneraud, 2019/06/28
- Re: [Gnucap-devel] link order, Felix Salfelder, 2019/06/29
- Re: [Gnucap-devel] link order, Christian Gagneraud, 2019/06/29
- Re: [Gnucap-devel] link order, Felix Salfelder, 2019/06/29
- Re: [Gnucap-devel] link order, Christian Gagneraud, 2019/06/29
- Re: [Gnucap-devel] link order, Felix Salfelder, 2019/06/29
- Message not available
- Re: [Gnucap-devel] link order, Patrick Mulder, 2019/06/29
- Re: [Gnucap-devel] link order, Felix Salfelder, 2019/06/29
- Message not available
- Message not available
- Re: [Gnucap-devel] link order, Felix Salfelder, 2019/06/30
- Message not available
- Message not available
- Re: [Gnucap-devel] link order, Felix Salfelder, 2019/06/30