static linking [message #644370] |
Fri, 10 December 2010 12:38  |
Eclipse User |
|
|
|
Hi all
I hope I've added this to the correct forum. I normally program using MSVC++ in windows but am now trying to use Eclipe CDT on Linux (Ubuntu). I wish to distribute the applications I'm creating and on MSVC++ the easiest way to do this is to statically link everything so I'm attempting to do the same in Eclipse but struggling. (I'm linking to wxWidgets, some of my own libraries and the C runtime)
I've tried adding the -static flag under project, properties, C/C++ Build, Settings, GCC C++ Linker, Miscellaneous, Other options. This gives me a link error
/usr/bin/ld: cannot find -lgcc_s
After a bit of Googling I found out about the -static-libgcc option so I've tried adding this in addition to and replacing the -static flag. In both cases I get the rather bizarre error
/usr/bin/ld: unrecognized -a option 'tic-libgcc'
If I don't use either option the program compiles and runs on my development machine but not on another machine (also running ubuntu).
How do I statically link my software? Alternatively is there a better way to distribute my software (I don't mind distributing source code)?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03874 seconds