Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Error using ${config_name} in run configuration
Error using ${config_name} in run configuration [message #1730263] Fri, 22 April 2016 20:39 Go to next message
Benjamin Shadwick is currently offline Benjamin ShadwickFriend
Messages: 7
Registered: February 2014
Junior Member
I have an existing codebase that builds multiple binaries via subsets of shared code (nothing I can do about that). I've set up an Eclipse project and am creating different build configurations for each binary.

I've got the build part working, where it puts a binary with the build configuration name in a directory with the build configuration name (build location is automatic, and artifact name is ${ConfigName}).


For the run part, I'd like to set "C/C++ Application" to ${config_name}/${config_name}
and working directory to something like ${workspace_loc:${project_name}/${config_name}}.

Unfortunately there are two problems here:
1. If I try to reference ${config_name} anywhere in the 'C/C++ Application' setting, I get a "Program does not exist" advisory at the top of the window.
2. If I try to reference ${config_name} anywhere in the working directory setting, I get an exception during launch: "Project name should be specified as variable argument for ${config_name} variable".

I don't understand what the given reason for #2 is at all. Someone else ran into it too: https://www.eclipse.org/forums/index.php/t/383687/

What's the point of ${config_name} showing up in the Variables... list on the run configuration menus if it can't actually be used?
Re: Error using ${config_name} in run configuration [message #1730290 is a reply to message #1730263] Sat, 23 April 2016 16:48 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
${config_name} requires an argument. Did you supply it? Then message is saying you didn't.

example: ${config_name:MyProj}
When selecting the variable using the Variables... button, there is a field named Arguments.

Haven't tried it, but I think you can just type it in without using the button.
Re: Error using ${config_name} in run configuration [message #1730294 is a reply to message #1730290] Sat, 23 April 2016 20:02 Go to previous messageGo to next message
Benjamin Shadwick is currently offline Benjamin ShadwickFriend
Messages: 7
Registered: February 2014
Junior Member
Thanks. I didn't remember seeing that at work yesterday on my Mars install, but I do see it at home on my Mars.1 install. I'll have to take another look next week.

I ended up just hard-coding everything for now.
Re: Error using ${config_name} in run configuration [message #1767963 is a reply to message #1730290] Wed, 12 July 2017 12:25 Go to previous messageGo to next message
Elkana Bronstein is currently offline Elkana BronsteinFriend
Messages: 1
Registered: July 2017
Junior Member
Thanks!

${config_name} of the current project is given by:
${config_name:${ProjName}}
Re: Error using ${config_name} in run configuration [message #1798981 is a reply to message #1730263] Wed, 28 November 2018 09:31 Go to previous messageGo to next message
Munesh Chauhan is currently offline Munesh ChauhanFriend
Messages: 1
Registered: November 2018
Junior Member
I encountered this similar error while running a C++ OpenCV code in Nsight Eclipse. In my case the error was due to changing (renaming) the project name where as the ${config_name} variable was still using the old name. So I changed the config_name to the new project name and everything worked well.
Re: Error using ${config_name} in run configuration [message #1850157 is a reply to message #1798981] Fri, 18 February 2022 10:46 Go to previous message
ac ac is currently offline ac acFriend
Messages: 7
Registered: January 2021
Junior Member
When using the "External Tools" I needed the following to get the config name (Debug, Release, ...):
${config_name:${project_name}}
Previous Topic:CDT has no SEGGER GDB option
Next Topic:CDT Debug not reading EOF from console
Goto Forum:
  


Current Time: Fri Mar 29 02:26:00 GMT 2024

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

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

Back to the top