Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » static linking
static linking [message #644370] Fri, 10 December 2010 12:38 Go to next message
Eclipse UserFriend
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)?

Re: static linking [message #728020 is a reply to message #644370] Thu, 22 September 2011 07:52 Go to previous message
Eclipse UserFriend
I am having similiar issues. Did you ever resolve the flags necessary to statically link libraries?
Previous Topic:Eclipse CDT with RDT
Next Topic:referenced element 'enablement' is not defined
Goto Forum:
  


Current Time: Fri Jul 18 07:32:31 EDT 2025

Powered by FUDForum. Page generated in 0.06282 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top