using Standard Library in MQX application

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

using Standard Library in MQX application

1,476 Views
eGuy
Contributor IV

Hi,

 

I tried to using std::string in my application ( MQX 3.4.0)

 

However whenever I include: 

#include <string>

 

I got a lot of compiling error. Could anyone tell me how to solve this problem?

 

 

Thanks

 

J.

0 Kudos
6 Replies

302 Views
PetrM
Senior Contributor I

Hello,

 

this is C++ standard. It is not applicable for MQX.

If you want to use some C style string functions, try this:

#include <string.h>

 

Regards,

PetrM

0 Kudos

302 Views
eGuy
Contributor IV

PetrM,

 

I did use C++ in my code.

 

I believe MQX can be compiled working with C++ application. ( the Former project I did used C++ ( CodeWarrior 6.3+ ColdFire5329+MQX2.50)).

 

Regards,

 

Jeff

 

0 Kudos

302 Views
eGuy
Contributor IV

In MQX, it redefines getwc, io_fgets, FILE etc, when I include <string> to use std::string , that causes compiling error......

other C++ features so far no problem.

 

 

 

Anyone sees similiar problem? I wish in next MQX release, it can provide examples for using C++ with MQX.

 

0 Kudos

302 Views
eGuy
Contributor IV
Could anyone from Embedded-Access give me response?
0 Kudos

302 Views
Doug_EmbeddedAc
Senior Contributor I

Typically we provide technical support for companies who have a support contract, however we do try to help users out in advance of a support contract if they are just starting out or evaluating our services. Please send a note to info@embedded-access.com with your contact information, and then we can take a look at it.

 

Doug

Embedded Access Inc.

0 Kudos

300 Views
eGuy
Contributor IV
I will use #define _MSL_CSTDIO to avoid including some CW header files which causing redefined macros and redeclaration for now.
0 Kudos