CW 10.4 - g++ compiler

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

CW 10.4 - g++ compiler

438 Views
acasaacasa
Contributor I

Hello,

 

First of all i would like to apologise if this problem has been resolved on other thread. I did a search but i couldn't find anything.

 

     The problem is that when i try to compile a c++ file using gcc(g++ lite) it doesn't work. It doesn't compile the file. I am using CodeWarrior 10.4. Also i'd like to mention that i have a twk70f120m but i don't think this is relevant to this matter.

     I've installed CodeSourcery to get the g++ compiler, I've also tried to give the IDE the direct path to the compiler but still nothing. Also i've used all the compilers for ARM (g++) that CW has and it didn't work. I am trying to fix this problem for quite a few days now.

 

     Please help.

 

 

Regards,

Radu

Labels (1)
0 Kudos
2 Replies

313 Views
BlackNight
NXP Employee
NXP Employee

Hi Acasa,

It might be that your project is not using the C++ nature. It means that unfortunately you cannot simply add C++ files to a C project: the project needs to be set up for C++.

The two articles below are on this topic, so they might help in your situation:

Compiling C Files with GNU ARM G++ | MCU on Eclipse

Processor Expert, gcc C++ and Kinetis-L with MQXLite | MCU on Eclipse

I hope this helps.

313 Views
acasaacasa
Contributor I

Thank you for your answer. It didn't really fixed the problem but it pointed me to the right direction. I managed to fix the issue doing the following:

I created a new workspace, i did a drag and drop on the project cplus from MQX for CW10gcc and i copied all the settings from that project to a new MQX project including the paths for the MQX libraries. Looks like it did the job. I had to do the drag and drop because if I added the cplus project using the new->project etc it didn't load the right one. Anyway, thank you for your help.

Regards,

Acasa

0 Kudos