lists.zerezo.com



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

***BOGO*** Re: [Mingw-users] Test program crashes with g++ 4.2.1-dw2 usinglibstdc++_s



Hi,

Danny Smith wrote:
> the -D_DLL adds the dllimport attribute to global object std::cout, so the
> linker looks for the __imp__mangled_name_for std_cout rather than non-__imp
> name.  It finds that in the import libstdc_s import lib and uses it. 
> 
> Without the -D_DLL the  std::cout does is refereenced without dllimport semantics so the
> linker, not finding the name in the dll import lib uses the one in static libstdc++ which
> is automatically added to the specs.  Now, the exe uses a different stdc::cout object than
> the one used by the library code, so bad things happen.
> 
> Danny
> 

Thanks for the explanation. Although I admit that this was of cause my 
fault maybe generating code which crashes could be prevented. Might it 
be possible that, similar to the "-shared-libgcc" option, there would be 
a "-shared-libg++" option (which sounds rather consistent), and this 
option could imply that the static libstdc++ is removed from the specs 
and that linker errors would occur in case the -D_DLL is missing? 
Anyway, this is just an idea.

Another question is: Could someone please upload re-packaged gcc-core 
4.2.1 packages including the libgcc*.dll and .a files? If I'm offering 
mingw-gcc 4.2.1 support by default for a specific project, people will 
be asking for the missing file(s).

Thanks,

Lothar


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users