Skip to main content



      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 17:45 Go to next message
Eclipse UserFriend
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 07:25 Go to previous messageGo to next message
Eclipse UserFriend
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).
Re: User defined output directory [message #664849 is a reply to message #664609] Tue, 12 April 2011 05:31 Go to previous messageGo to next message
Eclipse UserFriend
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 02:59 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: User defined output directory [message #665477 is a reply to message #665053] Thu, 14 April 2011 14:25 Go to previous messageGo to next message
Eclipse UserFriend
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 14:29] by Moderator

Re: User defined output directory [message #665566 is a reply to message #665477] Fri, 15 April 2011 02:21 Go to previous message
Eclipse UserFriend
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}

[Updated on: Fri, 15 April 2011 03:27] by Moderator

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


Current Time: Tue Jun 10 05:40:27 EDT 2025

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

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

Back to the top