Include error in MCU Xpresso IDE

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

Include error in MCU Xpresso IDE

8,108件の閲覧回数
Prajwal123
Contributor II

Hi. I am trying to compile a C++ project. I have included all the files in the includes list. Even then I am getting error saying tx_port.h file is neither a file or directory. I am using a GNU C++ compiler. The same application in C is compiled successfully. But using C++ compiler it is failing, What can be the reason?

0 件の賞賛
返信
14 返答(返信)

8,003件の閲覧回数
Prajwal123
Contributor II

Yes. I selected it

 

0 件の賞賛
返信

8,000件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Prajwal123 

Can you share the smallest project that contains errors? You can delete other codes.

BR

Harry

0 件の賞賛
返信

7,946件の閲覧回数
Prajwal123
Contributor II

Hi @Harry_Zhang . were you able to build the project in your system?

0 件の賞賛
返信

7,847件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Prajwal123 

I think you can import the SDK netx_duo example, and adds your code.

If you want to add C++ code, you need add <nature>org.eclipse.cdt.core.ccnature</nature> in .project.

Harry_Zhang_0-1733906541418.png

BR

Harry

0 件の賞賛
返信

7,824件の閲覧回数
Prajwal123
Contributor II

I tried this, but there are other errors, attached is the error log,

0 件の賞賛
返信

7,799件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Prajwal123 

I'm sorry, I also get errors when compiling. Although commenting on _tx_thread_stack_error_handler  can solve compilation problems, I don't think it solves the fundamental problem. I have reported this issue to the IDE team and hope they can resolve it as soon as possible.

BR

Harry

0 件の賞賛
返信

7,777件の閲覧回数
Prajwal123
Contributor II

I resolved this issue by using the extern “c” at right places in my application code. But I still have problem while creating a new project and using .cpp files in that. 
If you get it, please let me know the steps for it.

7,877件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Prajwal123 

My error is the same as yours. I am currently investigating this issue.

BR

Harry

0 件の賞賛
返信

7,993件の閲覧回数
Prajwal123
Contributor II
Sure
0 件の賞賛
返信

7,958件の閲覧回数
Prajwal123
Contributor II

Please find the attached project

0 件の賞賛
返信

8,031件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Prajwal123 

You imported the project from the SDK, and then added your C++ file, the compilation did not succeed?

BR

Harry

0 件の賞賛
返信

8,027件の閲覧回数
Prajwal123
Contributor II
I did not import the project from the sdk. I created new project and added the files
0 件の賞賛
返信

8,011件の閲覧回数
Prajwal123
Contributor II
I have created a new project with .cpp file and compiled. It is not detecting the tx_port.h even though I have included its's path in the includes for both compilers
0 件の賞賛
返信

8,003件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Prajwal123 

When you create a new project, did you select C++ Project ?

Harry_Zhang_0-1733736912557.png

BR

Harry

 

0 件の賞賛
返信