Search code examples
c++eclipseeclipse-cdt

How do I create a OS-neutral run configuration in Eclipse?


I would like to have a single run configuration that I can use whether I'm testing on a Windows system or a Unix system.

Everything seems to be fine with the exception that in the run configurations dialog the field for C/C++ Application requires the extension of the application as well.

enter image description here

So in Windows, it is: Path/To/Application.exe

and on a Unix system, it is: Path/To/Application

If there was someway to automatically detect the OS and apply the appropriate extension, I can share the same *.launch file with everyone working on the project regardless of their operating system.

I've looked a little bit into using Variables to set the path and file name, but most of them require additional dialogs and user inputs. Wild cards don't seem to work here either.

Any ideas?


Solution

  • Thanks to Marc K. for pointing out the quick fix of simply adding ".exe" extensions to the unix executables. Though, as he mentions, this isn't a perfect fix to the problem.