Web lists-archives.org

Re: [Mingw-users] Why does g++ not link with libstdc++?




fiveight wrote on 13 May 2008 06:06:

> But in my firm's project there are too many object files, so I put these
> object files path in a response file, for example "proj.rsp". Then I link
> with: g++ -o proj.exe -Wl,@"proj.rsp" 
> This command does not link with libstdc++.
> If I link with:
> g++ -o proj.exe -Wl,@"proj.rsp" -lstdc++
> It works well.
> 
> I remember that g++ will automatic link libstdc++. Why does the first
> command not work? 

  Guessing: compile doesn't add -lstdc++ because you're passing all the .o
files straight to the linker (-Wl), so it doesn't know you have any object
files at all.  Try passing it at least one, or maybe the mingw gcc.exe
understands "@" files itself?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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