newlib and standard c++ library

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

newlib and standard c++ library

ソリューションへジャンプ
5,838件の閲覧回数
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

ラベル(1)
タグ(2)
1 解決策
4,474件の閲覧回数
bobpaddock
Senior Contributor III
4 返答(返信)
4,474件の閲覧回数
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 件の賞賛
返信
4,474件の閲覧回数
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 件の賞賛
返信
4,475件の閲覧回数
bobpaddock
Senior Contributor III

See this thread on the constructor issue:

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

4,474件の閲覧回数
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 件の賞賛
返信