Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » calling linker in eclipse
calling linker in eclipse [message #150891] Fri, 05 August 2005 02:49 Go to next message
Eclipse UserFriend
I'm trying to link a few files into a static library, it builds the
object files ok but when it goes to link them the linker is obviously
not specified right, where can you change this? The output is:

'Building target: libutils.a'
null null libutils.a Observer.o logger.o
process_begin: CreateProcess((null), null null libutils.a Observer.o
logger.o, ...) failed.
make (e=2): The system cannot find the file specified.


I never really changed the settings, should be working off the default,
but I can't for the life of me find where to change the linker (its
trying to call "null null") to something like "g++". I looked under
Properties->C/C++ Build->Configuration Settings:Tool Settings:GCC C++
Linker and it says "g++" in the Command box.



Anthony
Re: calling linker in eclipse [message #150896 is a reply to message #150891] Fri, 05 August 2005 03:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kolbb.erlf.siemens.de

You must select "Static Library (Gnu)" instead of "Executable (Gnu)" on
the second page of the new project wizard when you create your project.
Then there is GCC Archiver instead of GCC C++ Linker in the properties,
where Command should be ar, All options should be -r
Re: calling linker in eclipse [message #150963 is a reply to message #150896] Mon, 08 August 2005 01:37 Go to previous message
Eclipse UserFriend
Benjamin wrote:
> You must select "Static Library (Gnu)" instead of "Executable (Gnu)" on
> the second page of the new project wizard when you create your project.
> Then there is GCC Archiver instead of GCC C++ Linker in the properties,
> where Command should be ar, All options should be -r
>

yes if you set the extension of the target to .a in an executable
project it doesn't know what to do when it gets to that stage (it
ignores the linker command). unfortunately there doesn't seem to be an
option to change the type of project to static library if it is set as
executable, so it will mean a whole lot of nasty directory and CVS
shuffling to change the project to a static library.
Previous Topic:No display of console screen buffer
Next Topic:Profiling C/C++ application
Goto Forum:
  


Current Time: Fri Jun 06 01:58:15 EDT 2025

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

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

Back to the top