Results 1 to 1 of 1
Hi,
I'm trying to create a static executable in c++ using g++ (version 4.1.3). I compile using the following command:
g++ test.cc -o test.exe -static -Wl,--whole-archive
I use -Wl,--whole-archive so ...
- 04-02-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 1
Error when creating a static executable
Hi,
I'm trying to create a static executable in c++ using g++ (version 4.1.3). I compile using the following command:
g++ test.cc -o test.exe -static -Wl,--whole-archive
I use -Wl,--whole-archive so that I can run the executable on different versions of linux. I get a large number of errors and I'm not sure how to fix them. They start like:
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libc.a(dso_handle.o)
.rodata+0x0): multiple definition of `__dso_handle'
/usr/lib/gcc/i486-linux-gnu/4.1.3/crtbeginT.o
.data+0x0): first defined here
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libc.a(s_isinf.o): In function `isinf':
(.text+0x0): multiple definition of `__isinf'
...
Any tips would be appreciated.


Reply With Quote