Search code examples
clinuxwindowseclipse-cdt

Switch C project configuration in Eclipse between Windows and Linux


I installed Eclipse with CDT plugin. I created a simple TCP client software that runs on Windows. I can open the project on Ubuntu also. I'd like to change build configuration in order to create Linux executable. Is it possible to create executable for the operating system that the project is compiled. I mean if I compile the project on Ubuntu, there should be Linux executable and if I compile the project on Windows, there should be Windows executable. Is it possible?


Solution

  • It is possible. When you are creating a Project in Eclipse, you are provided with two build options. One debug and one release. The release build will create the executable for the OS in which it is run.

    Good Luck!