Creating a Makefile project

This tutorial describes the process of creating a new C++ project that includes a makefile, and debugging the program.

You need to create a project to contain your source code and related files. A project has an associated builder that can incrementally compile source files as they are changed.

To create a project:

  1. Select File > New > Project.


    When you create a new project, you are required to specify the project type. This project type will determine the toolchain, data, and tabs that the CDT uses/displays.


  2. Select the type of project to create. For this tutorial, expand the C/C++ folder and select C++ Project.

    The C++ Project wizard opens. Click here to see an illustration.


    By default, the CDT filters the Toolchain and Project types that currently display in those lists are based on the language support for the C++ Project wizard you selected for this tutorial.


  3. In the Project name field, type HelloWorld.
  4. Leave the Use Default Location option selected.


    Next, you want to select the type of project to create. In the New CDT Project Wizard, you can choose from the following project types:

    By default, the CDT filters the Toolchain and Project types that currently display in those lists based on the language support for the C++ Project wizard you selected for this tutorial.

     

  5. From the Project types list, expand Makefile project and select Empty Project. This project lets you enter the source file and the makefile yourself.
  6. Select a required toolchain from the Toolchain list.

    A toolchain is a set of tools (such as a compiler, linker, and assembler) intended to build your project. Additional tools, such as a debugger, can be associated with a toolchain.
    There can be several toolchains available, depending on the compilers installed on your system.

  7. Click Next.
  8. (Optional) On the Select Configurations page, Click Advanced Settings.

  9. Click Finish.
  10. If a message box prompts you to change perspectives, click Yes.

Your new project displays in the Project Explorer view. Your project is empty because you have not yet created files for your project. You may see an error since there is nothing to build yet for your project. You can now start writing the code for your HelloWorld program.

Tip: You can view and modify the properties of your HelloWorld project at any time by right-clicking on the project in the Project Explorer view and clicking Properties.

Next Icon Next: Creating your C++ file

For more information about:

Related concepts
CDT overview
CDT projects
Project file views

Related tasks
Working with C/C++ project files

Related reference
C/C++ Projects view

QNX Copyright Statement