Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » variable link path
variable link path [message #940430] Thu, 11 October 2012 16:23
Filter Punk is currently offline Filter PunkFriend
Messages: 3
Registered: October 2012
Junior Member
How can I include a file from a variable location?
My applications needs to link to: "C:\Program Files\Java\jdk1.7.0_07\include\jni.h".
Unfortunately there exist different versions of jdk in the compony I work. Therefore I need to have a variable for that path.
In Eclipse I can create a "Linked Resource" (Preferences-General-Workspace) to point to a static path.
I can achieve the same by creating a "Build Variable" (Project Properties-C/C++ Build) and use the name of the
Linked Resource or Build Variable as a symbol in the include paths (e.g. ${JDK_HOME}).

But I need a dynamic path. I can find out the installed jdk version from windows registry. But I can not run this script from within Eclipse, since it does not allow reading from HKEY_LOCAL_MACHINE, only from HKEY_CURRENT_USER.

Then I tried to run my script from "../makefile.init". But I found out, that the default C++ MinGW project does not even generate makefiles and I found no way to change that. Also the MinGW installation used in the compony does not include a gnu make command.

Is there any way to run an external script from and evaluate its result in eclipse?
Previous Topic:pre-build step not working
Next Topic:CDT Build Console
Goto Forum:

Current Time: Sat May 26 23:45:59 GMT 2018

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

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

Back to the top