From: <xav...@ho...> - 2001-04-12 20:08:12
|
Sorry if this has been asked before, but i've just joined the topic... why not forget that libstdc++.dll and make the compiler link staticly by default as many other compilers do? or is there a reason for the dynamin linking by default? > Hello John, > > I think I was wrong: > the compiler and linker comming with gcc.2.95.2.3 will do an static linking only > if you do it with commands like that: > > static.exe: static.o > $(CXX) -Wl,-static -o $@ $< > > static.o: trivial.cpp Makefile > $(CXX) -D__STATIC__ -c $< -o $@ > > or > > trivial.exe: trivial.o > $(CXX) -Wl,-static -o $@ $< > > trivial.o: trivial.cpp Makefile > $(CXX) -static -c $< > > > But: > Untill the dicussion about your mail I used the gcc-2.95.2-20001116.zip. With > this installation > the stdg++ was allways static linked. There was no libstdc++.dll. > The file libstdc++.a in both distributions is the same. > > > > > > John Lehmann wrote: > > > > Oh, can you do a static link with older versions of gcc but not the newest? > > I've gotten all kinds of different answers to my original question... > > > > Thanks, > > John > > > > ----Original Message Follows---- > > From: Georg Fusz <fu...@is...> > > To: John Lehmann <jpl...@ho...> > > Subject: Re: [Mingw-users] Can I statically link to libstdc++.dll? > > Date: Thu, 12 Apr 2001 15:50:19 +0000 > > > > The simplest solution is: > > Give your teacher your executable and the DLL. > > > > Try to link it with the static lib from an older release of gcc.XXX.zip. > > If you don't have an, I can mail you such file. > > > > John Lehmann wrote: > > > > > > Hello, > > > > > > Either this is probably a common question or it's a really dumb question, > > > but I tried hard and couldn't find an answer. > > > > > > How can I create an executable with G++ (win32 with mingw) that will run > > > apart from having libstdc++.dll? For example, I want to compile my > > project > > > with G++ and turn it in (we're turning in executables too), but the > > teacher > > > won't have the dll because he won't have installed mingw. > > > > > > I tried to use the -static libstdc++.a (with the path) but that was just > > a > > > shot in the dark and it didn't work... > > > > > > Thanks, > > > John > > > _________________________________________________________________ > > > Get your FREE download of MSN Explorer at http://explorer.msn.com > > > > > > _______________________________________________ > > > MinGW-users mailing list > > > Min...@li... > > > > > > You may change your MinGW Account Options at: > > > http://lists.sourceforge.net/lists/listinfo/mingw-users > > > > -- > > Georg Fusz > > Technische Universitaet Berlin, Germany > > > > Fon: > > Uni.: +49 30 314 26 884 > > privat: +49 30 815 30 32 > > Handy: +49 173 20 10 696 > > > > Homepage: http://www.cadlab.tu-berlin.de/~fusz/ > > > > _________________________________________________________________ > > Get your FREE download of MSN Explorer at http://explorer.msn.com > > -- > Georg Fusz > Technische Universitaet Berlin, Germany > > > Fon: > Uni.: +49 30 314 26 884 > privat: +49 30 815 30 32 > Handy: +49 173 20 10 696 > > Homepage: http://www.cadlab.tu-berlin.de/~fusz/ > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/lists/listinfo/mingw-users > |