Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Variable in file to control name of the output file
Variable in file to control name of the output file [message #742645] Thu, 20 October 2011 13:38 Go to next message
Eclipse UserFriend
Hello!!

Is it possible to define a variable within the source code e.g. in a .c file or a .h file and control with this variable the name of the output file?

If yes, how can I do this and where should I insert this variable.

Thank you all for helping.
Re: Variable in file to control name of the output file [message #742780 is a reply to message #742645] Thu, 20 October 2011 16:42 Go to previous messageGo to next message
Eclipse UserFriend
Your question doesn't really give enough information to understand what you are looking to do. Could you explain a little more what you are asking about?
Re: Variable in file to control name of the output file [message #743092 is a reply to message #742780] Fri, 21 October 2011 01:30 Go to previous message
Eclipse UserFriend
I have several projects with nearly the same source code.

For the little difference between the projects I use pre compiler directives like #if (project_1 == True) ... #elif (project_2 == True) ... ... #endif

For each project I want to have a separate output file named project_1.xxx, project_2.xxx, ... .

The name of the output file is influenced by an Eclipse Variable called ${BuildArtifactFileBaseName} or something like this.

I am now searching for a way to change this variable with a source code directive like ${BuildArtifactFileBaseName} = project_1.xxx but this seems not be so easy.

I know that it is possible when I create several build configuration. But the disadvantage thereby is the I have to correct each configuration when I change something in the settings.

I hope this explanation makes it a bit easier to understand what I want.

Thanks all for helping.
Previous Topic:Build Completes Then Waits?
Next Topic:timezone build
Goto Forum:
  


Current Time: Wed Jul 09 15:57:04 EDT 2025

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

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

Back to the top