Compiling a simple c++ file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiling a simple c++ file

852 Views
ptcaos
Contributor III

Hello,

I want to test MCUXpressoIDE to use it in my C++ projects. In my first test, I have create a C++ project and I have added a cpp file with this lines:

#include <stdio.h>

int main()
{
    int i, j;
    i = 1;
    j = 2;
    i++;
    j += 1;

    return 0;
}

However, building project reports me some errors... It seems I NEED TO add a SDK to my MCXU IDE, with I would like to use MCUX with no FRDM-KLxx board, only for C++ code.

What am I doing wrong?

Thanks.

Tags (1)
0 Kudos
2 Replies

787 Views
converse
Senior Contributor V

It would help if you told us which errors you are getting.

ps. The code you have provided is actually C, so you are not testing any C++ features..

0 Kudos

787 Views
BlackNight
NXP Employee
NXP Employee

Hello,

Not sure if I see your point. The SDK will provide you the default startup code, the default project/compiler settings and the linker file. If you have these or if you write your own, you don't need any SDK.

I hope this helps,

Erich

0 Kudos