newlib and standard c++ library

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

newlib and standard c++ library

Jump to solution
4,891 Views
danielomsland
Contributor I

Hi,

I got some problems when changing from ewl to newlib in order to use to Heap.

 

When including #include <string>, I got: Unresolved inclusion: <string> error.

I am able to do a #include <c++/4.9.2/string>, but I am not able to use std::string nor am I allowed to use the standard namespace: using namespace std;

 

Is it possible to use any of the standard library functions that needs dynamic memory allocation in S32DS?

 

Daniel

Labels (1)
Tags (2)
1 Solution
3,527 Views
bobpaddock
Senior Contributor III

See this thread on the constructor issue:

https://community.nxp.com/thread/448479 

View solution in original post

4 Replies
3,527 Views
reneherrero
Contributor I

Hi Martin,

Any updates on this?  I'm having the same problem.  Creating a library with something as simple as what's below fails:

#include <string>
class C {
public:
    std::string m_string;
};

Note that the library does compile.

I pocked around and found that by updating the Preprocessor Include Paths, the "Unresolved inclusion: <string> error." goes away.

IncludePaths.PNG

But, I still get a "Type 'std::string' could not be resolved" error and I wasn't able to get any further... bummer.

Looks like something in the "CDT S32 Built-in Compiler Settings" for C++ is off.

Note his piece does work fine on the Kinetis Design Studio.

Thanks,

René

PS: Do you know where I can find a S32DS vs KDS comparison?  Trying to figure out which way to head with KEA family chips... 

0 Kudos
3,527 Views
IanMcelhenny
Contributor I

Was this ever solved? I am having a similar issue with the STL Vector Library. If I change the paths like you said it removes the error on the include, however the constructor is still unrecognized. 

0 Kudos
3,528 Views
bobpaddock
Senior Contributor III

See this thread on the constructor issue:

https://community.nxp.com/thread/448479 

3,527 Views
martin_kovar
NXP Employee
NXP Employee

Hi Daniel,

I have checked your problem and we are working on it. I will try to inform you as soon as possible.

Regards,

Martin

0 Kudos