Unresolved inclusion

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

Unresolved inclusion

949 Views
biafra
Senior Contributor I

Hi everyone,

 

I'm using MCUXpresso 24.9.

For some reasons in my project I needed to chnge the compiler command line. The chenges are working fine, the project is built without problem.

But there is a side effect: the indexer is not able to resolve lib include files:

biafra_0-1728895441980.png

 

To debug the problem I created a test program with the default options (New Project -> Create a new C/C++ project), then I changed the command line to compile the project (Project properties -> C/C++ Build -> Settings -> MCU C compiler) from the default value ("arm-none-eabi-gcc") to "../compile.cmd":

biafra_1-1728895775700.png

 

The file compile.cmd is located in the project directory and contains the single line:

arm-none-eabi-gcc %*

  

If I compile the program the process is terminated without errors, but all the c library files are highlighted as unresolved inclusions: so the problem belongs only to the indexer.

 

When there is the default setting no highlight is present and in the <WorkspaceDir>\.metadata\.log file there are the following messages:

!ENTRY org.eclipse.cdt.core 1 0 2024-10-14 10:30:17.365
!MESSAGE Indexed 'MIMXRT1064_Project' (20 sources, 43 headers) in 1,87 sec: 8.359 declarations; 17.870 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

 

While when there is my custom setting there are the following messages:

 

!ENTRY org.eclipse.cdt.core 4 0 2024-10-14 10:32:13.001
!MESSAGE Error: Cannot run program "..\compile.cmd": Launching failed
!STACK 0
java.io.IOException: Cannot run program "..\compile.cmd": Launching failed
	at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:450)
	at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:147)
	at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:134)
	at org.eclipse.cdt.utils.spawner.ProcessFactory$Builder.start(ProcessFactory.java:273)
	at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:366)
	at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:189)
	at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:274)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:808)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:736)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:601)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:527)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.cdt.core 1 0 2024-10-14 10:32:14.602
!MESSAGE Indexed 'MIMXRT1064_Project' (20 sources, 30 headers) in 1,05 sec: 7.246 declarations; 12.921 references; 18 unresolved inclusions; 59 syntax errors; 3.440 unresolved names (15%)

 

How can I try to remove the problem?

 

Many thanks

Biafra

 

7 Replies

776 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @biafra 

Sorry I haven't received the file. Could you please send it again?

 

BR

Alice

 

BR

Alice 

669 Views
biafra
Senior Contributor I

Hi @Alice_Yang,

 

Did you received the file?

 

Many thanks

Biafra

 

622 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @biafra 

Yes, I have received it. I need to confirm with the IDE development team. I will reply to you as soon as possible. Thank you for your patience.

 

BR

Alice 

745 Views
biafra
Senior Contributor I

HI @Alice_Yang,

 

Sorry for the mistake, the file is attached.

 

Many thanks

Biafra

 

888 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @biafra 

Could you please send your whole project with compile.cmd. I help to test and check on my side. Thanks.

 

BR

Alice

862 Views
biafra
Senior Contributor I

Hi @Alice_Yang,

 

I did a step ahead.

If I set the command line to compile the project with the absolute path of compile.cmd file (C:/MyProject/compile.cmd), the unresolved inclusions decorations disappear.

So I tried to use the PROJECT_LOC path variable, but it seems it's not expanded and I have build errors too.

 

Is there a way to give the indexer a relative path to the compile.cmd file? Or even an absolute path depending on the project location?

I need the project location can be changed, because of different project developers drive path.

 

Many thanks

Biafra

 

877 Views
biafra
Senior Contributor I

Hi @Alice_Yang,

 

Many thanks for your asnwer.

 

The project is attached. Let me know if you need something else.

 

Many thanks

Biafra