[Top][All Lists]

[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?

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]