Web lists-archives.org

Re: [Mingw-users] STL and undefined reference to '_abort' etc.




On Wednesday 16 April 2008 22:54, Zack Morris wrote:
>  If I just add this to my main.c:
>
> #include <string>
> std::string             test;

Please expand this into a complete, self-contained minimal test case, to 
demonstrate the problem.

> it kills the linker.  Right now I am linking with ld ...

You are using a cross-compiler tool chain, right?  ld would be your 
*native* linker, not the cross-linker.  Or am I misunderstanding?

Anyway, please don't do that; for C++ code, let i386-pc-mingw32-g++, (or 
whatever the appropriate g++ driver is called), choose the appropriate 
format for the linking command, so you don't have to worry about which 
of these ...

> -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
> -ladvapi32 -lshell32

you need, or in what order they should be specified, for g++ will take 
care of that for you.  However, it won't help you with this ...

> libgcc_eh.a

which doesn't even appear in *my* mingw32 cross-compiler tool chain, 
(which is gcc-3.4.5).

Regards,
Keith.

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