Web lists-archives.org

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




On Wednesday, April 16, 2008, at 03:28PM, "Keith Marshall" <keithmarshall@xxxxxxxxxxxxxxxxxxxxx> wrote:
>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.

Unfortunately it's an xcode project that has several complex things going on with symlinks, perl scripts and build phase scripts to get it to work with mingw, so it's hard for me to post an example.  I finally figured out the other problem, it was how you said, I was calling gcc's collect2 instead of mingw's.  So now I have symlinks from gcc, collect2 and ld to my mingw.pl, collect2.pl and ld.pl, that call mingw's tools.  This way I can filter out any apple-specific args that kill mingw.

So I got it all working, except if I have:

#include <iostream>

then I get:

/Users/zmorris/Development/Windows/test-xcode/build/test.build/Release/test.build/Objects-normal/i386/main.o:main.cpp:(.text+0x54): undefined reference to `std::ios_base::Init::Init()'
/Users/zmorris/Development/Windows/test-xcode/build/test.build/Release/test.build/Objects-normal/i386/main.o:main.cpp:(.text+0x68): undefined reference to `std::ios_base::Init::~Init()'

I am including all of the std libs, here is my list so far:

-lshell32 -lshfolder -ldxguid -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -luser32

Does anyone recognize this problem?

Thanx!

--Zack

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