Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Default binary path
Default binary path [message #1764945] Sun, 04 June 2017 10:45 Go to next message
Eclipse UserFriend
Hello everyone.
I'm doing some experiments with Eclipse Neon and CDT.
I can build a project, but for each project I create I have to manually set the binary path, otherwise Eclipse won't run it.
Now, my problem is: can I set a default binary path?
E.G., Setting an option in the global Eclipse preferences which uses some kind of variable to obtain a path.
Let's assume that I wrote an hello world project, with both Release and Debug builds.
What I would need is something like WorkSpaceFolder/PprojectFolder/BuildConfiguration/
Is this possible, or do I have to manually set it for every project?

Thanks in advance for any help.

Bye, Marco.

[Updated on: Sat, 24 June 2017 06:22] by Moderator

Re: Default binary path [message #1765008 is a reply to message #1764945] Mon, 05 June 2017 12:51 Go to previous messageGo to next message
Eclipse UserFriend
Are you referring to the binary path in the Launch Configuration?

If so, I normally set up my launch configuration by right-clicking on the binary to run/debug and choose Run As -> or Debug As ->. That sets up the binary path correctly.

But to answer your question, I don't know of a way to have a default.
Re: Default binary path [message #1765010 is a reply to message #1765008] Mon, 05 June 2017 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Doing as you told results in an error: "Launch failed. Binary not found".
I can workaround this by editing project properties and giving the path for the binary, but on a per-project basis, not globally.
Re: Default binary path [message #1765012 is a reply to message #1765010] Mon, 05 June 2017 13:01 Go to previous messageGo to next message
Eclipse UserFriend
P.S.: I have, for each project, to enter project properties, then select run/debug settings, then create a new launch configuration and give it the path to the executable.
What I would like to do is to set a global {project-folder}/{build-configuration}/{executable-name} variable somewhere in the preferences and avoid the steps above.
Re: Default binary path [message #1765013 is a reply to message #1765010] Mon, 05 June 2017 13:03 Go to previous messageGo to next message
Eclipse UserFriend
Are you on Linux? That error has been causing CDT some problems recently, CDT should be finding the binary, but:

from https://bugs.eclipse.org/bugs/show_bug.cgi?id=512822#c4:
Quote:
For security, operating systems are starting to use PIE, which make executables look like shared libraries. The theory being that if an executable gets loaded into different places on every run, it'll be harder to crack.


My solution for that has been to right click on the executable itself, rather than on the project.

But as I said, I don't have a way to do this globally.

HTH,
Jonah



Re: Default binary path [message #1765056 is a reply to message #1765013] Tue, 06 June 2017 05:39 Go to previous message
Eclipse UserFriend
Yes, I'm on linux. Now I see why it doesn't work.
So it's an OS dependent issue, not an Eclipse one?

Thanks anyhow.
Previous Topic:Problem viewing const char** as array of cont char* with lldb
Next Topic:Checksum Calculation
Goto Forum:
  


Current Time: Tue Apr 15 02:20:04 EDT 2025

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

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

Back to the top