Skip to content

Eclipse project for examples

  • Open Eclipse
  • Click File --> New --> C/C++ Project
    1. Input Project name --> Uncheck use default location --> Provide the location of the example folder
    2. Select Executable --> Empty project in Project type
    3. For Windows, Select MinGW GCC as Toolchain
    4. For Linux, Select Linux GCC as Toolchain

Image: Eclipse C Project for Windows

Eclipse C Project for Windows

Image: Eclipse C Project for Linux

Eclipse C Project for Linux
  • In Project Explorer window, Right click on the project created --> Click Properties --> C/C++ Build --> Tool Chain Editor --> Select Current builder as Gnu Make Builder
  • Again click on C/C++ Build
    1. For Windows, Uncheck "Use default build command" and type build command as mingw32-make
    2. Uncheck generate Makefiles automatically
    3. Ensure Build location path is chosen from the workspace
    4. Click Apply and Close button

Image: Windows Eclipse Project Properties

Windows Eclipse Project Properties

Image: Linux Eclipse Project Properties

Linux Eclipse Project Properties

Build project

In Project Explorer window, Right click on the project --> Click Build Project. The executable file will be generated.

Debug project

  • Click on Run -> Debug As -> Local C/C++ Application
  • Once launching is completed, Click on
    1. Resume button to run the application
    2. Terminate button to stop running the application

Image: Eclipse Debug Configuration

Eclipse Debug Configuration