Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » static linking
static linking [message #644370] Fri, 10 December 2010 17:38 Go to next message
phil rosenberg is currently offline phil rosenbergFriend
Messages: 1
Registered: December 2010
Junior Member
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 11:52 Go to previous message
renee is currently offline reneeFriend
Messages: 1
Registered: September 2011
Junior Member
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: Sat Apr 27 02:13:15 GMT 2024

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

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

Back to the top