Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » User defined output directory(How to specify the directory for the output files)
User defined output directory [message #664442] Fri, 08 April 2011 21:45 Go to next message
No real name is currently offline No real nameFriend
Messages: 3
Registered: April 2011
Junior Member
I configured my Eclipse CDT project to build a shared library. Finally the built file works as intended. However there is one change I would like to do and I am desperate to find out how as I have tried already so much.

My directory structure should be like this:

src/
       cpp
       java

bin/
       cpp
       java


However, as Eclipse CDT generates the makefile it uses Debug and Release as folder. Is there any way to specialize it to a custom one?
Re: User defined output directory [message #664609 is a reply to message #664442] Mon, 11 April 2011 11:25 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Project Properties->C/C++ General->Paths and Symbols
in Output location you can specify where your shared lib wil land (you can define this for every build configuration. Debug and Release are the two default configs).


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: User defined output directory [message #664849 is a reply to message #664609] Tue, 12 April 2011 09:31 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 3
Registered: April 2011
Junior Member
Axel Mueller wrote on Mon, 11 April 2011 07:25
Project Properties->C/C++ General->Paths and Symbols
in Output location you can specify where your shared lib wil land (you can define this for every build configuration. Debug and Release are the two default configs).


Thank you for your answer so far, but the definition allows only the depth for one folder. When trying to enter bin/cpp as symbol, I get invalid syntax errors in the window.
Re: User defined output directory [message #665053 is a reply to message #664849] Wed, 13 April 2011 06:59 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
No Real Name wrote on Tue, 12 April 2011 11:31
Axel Mueller wrote on Mon, 11 April 2011 07:25
Project Properties->C/C++ General->Paths and Symbols
in Output location you can specify where your shared lib wil land (you can define this for every build configuration. Debug and Release are the two default configs).


Thank you for your answer so far, but the definition allows only the depth for one folder. When trying to enter bin/cpp as symbol, I get invalid syntax errors in the window.

????
Click "Delete" button to remove the default path. Then click "Add Folder.." and select your output folder.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: User defined output directory [message #665477 is a reply to message #665053] Thu, 14 April 2011 18:25 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 3
Registered: April 2011
Junior Member
Which property field do you mean? This one here?

http://img200.imageshack.us/f/bildschirmfotopropertie.png/

also this bug report here tells me it is not possible anyway: https://bugs.eclipse.org/bugs/show_bug.cgi?id=180451

[Updated on: Thu, 14 April 2011 18:29]

Report message to a moderator

Re: User defined output directory [message #665566 is a reply to message #665477] Fri, 15 April 2011 06:21 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
Which property field do you mean? This one here?
http://img200.imageshack.us/f/bildschirmfotopropertie.png/

No. It is C/C++ General->Paths and Symbols and then the tab "Output location"

Quote:
also this bug report here tells me it is not possible anyway: https://bugs.eclipse.org/bugs/show_bug.cgi?id=180451

Hmm, you're right. This will not work for managed build.
But you can define a post build step in C/C++ Build/Settings which moves your library to the correct folder.


EDIT:
I have a better idea. You can define the name of the created library/application in Project Properties->C/C++ Build->Settings
Open the tab Tool Settings and then select "GCC C++ Linker". The command line pattern is shown on the right side
${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX} ${OUTPUT} ${INPUTS}

You can put your output path in front of $(OUTPUT)
e.g.
${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX} ${ProjDirPath}/bin/${OUTPUT} ${INPUTS}



Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google

[Updated on: Fri, 15 April 2011 07:27]

Report message to a moderator

Previous Topic:Find window keeps getting larger
Next Topic:Eclipse backward history and quick outline in CDT
Goto Forum:
  


Current Time: Fri Apr 19 14:10:47 GMT 2024

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

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

Back to the top