Errors when including EWL C++

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

Errors when including EWL C++

2,424 Views
derekdrost
Contributor III

     Hello everyone. I am working with CodeWarrior 10.3, MQX 4.0. I am working on a c++ project, however, when I add the C++ Folder to my includes, I get errors inside the char_traits file. Which is located inside the C++ includes in the MQX Folder.

 

     Picture is attached which may help.

 

     Anyone have any ideas?

 

 

     Thanks for the help!

Original Attachment has been moved to: test_bis.zip

Labels (1)
0 Kudos
Reply
14 Replies

1,871 Views
trytohelp
NXP Employee
NXP Employee

Hi Derek,

Difficult to say what is the problem.

What do you mean by " when I add the C++ Folder to my includes" ?

You're using CodeWarrior 10.3, MQX 4.0.how are you created the project ?

We need more info to try to reproduce the problem on our side.

Regards

Pascal


0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

Hi Pascal,

I add “${MCUToolsBaseDir}/Arm_EABI_Support/ewl/EWL_C++/include” into the c section under properties->c/c++ General ->Paths and Symbols.

I started the project using the cplus example, then I would include “vector.h” in my project. I am then able to use the vector object, however, I get around 45 errors inside of the char_traits file located inside of the C++ include folder.

Thank you for the reply,


Derek

0 Kudos
Reply

1,871 Views
trytohelp
NXP Employee
NXP Employee

Derek,

When you create a project for Kinetis there are some options proposed in project Wizard.

For instance compiler type: GCC or Freescale.

I've created an example using Freescale compiler.

in the project Properties under C/C++ Build ¦ Settings ¦ Librarian, you select the EWL libraries.

On my side I've already the "${MCUToolsBaseDir}/Arm_EABI_Support/ewl/EWL_C++/include” defined in properties->c/c++ General ->Paths and Symbols.

Now I added # include "vector.h"

and it's working.

I can build the project without problem.

I will try to send you the example I've created.

Pascal


0 Kudos
Reply

1,871 Views
trytohelp
NXP Employee
NXP Employee

Derek,

I added my example project named test_bis.zip.

Have a look at your original question.

Pascal

0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

Well I can run your program no problem, however I am having problems getting my current project to either:

1. Take the settings you have and let me use it in my current project.

2. Put my project into yours.

I attached my project, any help would be really appreciated.

Thank you so much,

Derek

0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

my bad, it's attached now

0 Kudos
Reply

1,871 Views
trytohelp
NXP Employee
NXP Employee

Hi Derek,

I've performed some tests on my side and probably you've created the project without C++.

when the C++ is not selected at project wizard, the Paths and Symbols contains:

      ${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C/include only.

whereas the C++ options project includes

      ${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C/include

      ${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C++/include

some other settings should be added when the project is defined as C++ by default.

this seems to be the cause of the problem.

If you need other info, don't hesitate to re-contact me.

Pascal

0 Kudos
Reply

1,871 Views
trytohelp
NXP Employee
NXP Employee

Hi Derek,

the project sent included some folders.

cplus_DerekK40CPlusPlusFilter contains the project.

Other folders include MQX project.

According to the info found you're using MK40N512MD100.

Do you have created your own MQX lib ?

I've got lot of problem linked to the MQX lib.

Pascal

0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

Pascal,

I have created a project that does the following:

Using the exact same project configurations for both of the following examples.

I can include my mqx.h, bsp.h, and fio.h. with no errors.

However if I include <vector> as well I get errors.

BUT if I comment out the first 3 includes, so I'm just including <vector>. I get no errors.

pretty lost at this point =/

Thanks again for your help,

Derek

0 Kudos
Reply

1,871 Views
trytohelp
NXP Employee
NXP Employee

Derek,

Following your last info I've:

- created a new project using project wizard for MQX 4.0 K40d100M board,

- added the path ${MCUToolsBaseDir}\ARM_EABI_Support\ewl\EWL_C++\include,

- added C++ code and selected the ARM compiler  ¦ Language option Force C++ Compilation,

- included the mqx.h, bsp.h and fio.h.

At this side the project can be built without problem.

If I add the vector.h, I got 45 errors.

If I comment the mqx.h, bsp.h and fio.h, I still get the errors.

Attached you will find my project example.

Pascal

0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

Good morning Pascal,

     I know what you mean, the problem I am having is:

     1: Converting my project into a C++ project, by changing the project properties and other settings.

     2: Starting out with a new C++ project, then adding my code and changing settings to get the right debugger, etc..

     If you could help me figure out a way to do either that would be great. I've been trying to get this to work the last couple days and I've hit a wall.

Thank you for your help!

Derek

0 Kudos
Reply

1,871 Views
trytohelp
NXP Employee
NXP Employee

Ok so, you need to convert the project sent which was created as C project to a C++ one.

I need to perform some tests on my side to determine/find all settings to change.

The better was is to use a new project with wizard for C++.

I will keep you informed.

Pascal

0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

Pascal,

     Alright I'll give it a look. Let you know if I get it working.

     Thanks again!

Derek

0 Kudos
Reply

1,871 Views
derekdrost
Contributor III

Any ideas? If anyone needs more info just ask =p

0 Kudos
Reply