Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » custom object compilation
custom object compilation [message #1714089] Mon, 09 November 2015 19:54 Go to next message
Dio Santo is currently offline Dio SantoFriend
Messages: 6
Registered: August 2012
Junior Member
What is the cleanest way to integrate in a C/C++ project a .o dependency with a completely custom build step?
Re: custom object compilation [message #1714110 is a reply to message #1714089] Mon, 09 November 2015 23:32 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Depends on what you mean by " a completely custom build step". If it involves using make then you pass the dependencies the way make wants to see them. If however you mean a build step that doesn't involve make then It would depend on what you are using and only you can provide the answer.

EDIT:
I might point out that title you gave was custom object compilation. Compilation doesn't normally have .o dependencies but linking does. Why would you need to specify the order of compilation?

[Updated on: Mon, 09 November 2015 23:39]

Report message to a moderator

Re: custom object compilation [message #1714111 is a reply to message #1714110] Mon, 09 November 2015 23:37 Go to previous messageGo to next message
Dio Santo is currently offline Dio SantoFriend
Messages: 6
Registered: August 2012
Junior Member
I mean that I want to inform the Eclipse CDT makefile that I need a .o object to build my executable, so I want to add a xyz.o in the makefile, then I want to provide the build commands, verbatim, to produce this xyz.o. I don't want to simply hack it by abusing the usual dialog where you set the compiler argument for specific compile units.
Re: custom object compilation [message #1714112 is a reply to message #1714111] Tue, 10 November 2015 00:01 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Seems to me that if you produce an object file and place it with the others, CDT will pass it on to the linker. CDT usually doesn't care how the object file came about. It sounds like you want to produce one or two files a special way (that is with a special tool other than say GCC) and don't want to generate your own make file. Essentially then, another entry in the tool chain. I don't think there is an easy way to make your own tool chain. You could instead compile it in maybe the pre-build step or another approach would be to execute a shell script for all compiles that branches on the file type or some other criteria. That's what the GNU GCC command effectively does.

If it's produced externally to your build and Eclipse is unaware of it, then you could tell the linker to include it by using the settings for the linker under Miscellaneous which may be what you are looking for.

[Updated on: Tue, 10 November 2015 00:02]

Report message to a moderator

Previous Topic:make*** error 1
Next Topic:Adjust indentation does not work in CDT 8.8.0
Goto Forum:
  


Current Time: Wed Sep 18 06:16:56 GMT 2024

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

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

Back to the top