From: <dan...@ya...> - 2001-05-20 21:08:22
|
--- Ikm <ik...@on...> wrote: > Saturday, May 19, 2001, 9:47:50 PM, you wrote: > > > > CH> You must compile your objects using the -D__static__ flag. > > Doesn't help. I still get link errors. > > I tried before: > > >> gcc 1.cxx -static -lstdc++ > > >> but it refused linking, outputting several link errors: > > >> Warning: resolving _cout by linking to __imp__cout (auto-import) > >> fu000001.o(.idata$3+0xc): undefined reference to > `libstdc___a_iname' > >> nmth000000.o(.idata$4+0x0): undefined reference to `_nm__cout' > > Then I tried > > gcc 1.cxx -D__static__ -static -lstdc++ > > with the same results. > > Your almost there. -static is a linker switch, so you need to explicitly pass it to the linker, using -Wl,<options> Like so: gcc 1.cxx -D__static__ -Wl,-static -lstdc++ Danny _____________________________________________________________________________ http://messenger.yahoo.com.au - Yahoo! Messenger - Voice chat, mail alerts, stock quotes and favourite news and lots more! |