CW10.1 Path issue, IDE showing unresolved links, but they are there and they build ok

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

CW10.1 Path issue, IDE showing unresolved links, but they are there and they build ok

Jump to solution
1,326 Views
CarlFST60L
Senior Contributor II

Hi,

 

I have seen plenty of posts on the confusion surrounding CW10.1 and its management of linked resources.

 

To show the latest issue I am having, I have created a basic project with just MQX3.7 in CW10.1 and nothing else, just hello world which the project wizard creates.

I then created a test source file on c:\test, I added this folder as a path in the linked resources and dragged and dropped it into the project. I just put the following in the files

in the header

#defines _TEST_

extern uchar test(uchar);

in the c file

#include "test.h" (also bsp and MQX)

uchar test(uchar) {return --uchar;}.

 

Now back in main.h, i put #include "testcode.h", and it shows that it cannot resolve the inclusion, but it can, it compiles and uses  the function and #define's from main based on the header, yet the IDE thinks it cannot resolve the #include, and the #ifdef is not grayed out, or grays out on demand...

 

Why is the IDE saying |?| unresolved inclusion when it clear resolves and compiles? Why does the "Outline" window show the test.h with a /!\ symbol, even though I double click and it opens the file? Does the IDE require some special path info? Does the IDE have some other requirments?

 

Carl.

Labels (1)
0 Kudos
1 Solution
633 Views
CarlFST60L
Senior Contributor II

Hi,

 

Thanks for the reply CrasyCat!

 

wow, i guess a reboot fixed it as it works exactly as expected, the exact project I was using above now works after a reboot..

 

Playing some more I cannot get the recursive path (-IR) to work, but manually adding every folder does work (today)...

View solution in original post

0 Kudos
4 Replies
633 Views
CarlFST60L
Senior Contributor II

Hi,

 

Just playing with some demo's (D4D2.1, MQX, CW10.1), and this problem appears to be happening throughout various examples, even the debugger shows 'grayed out' code yet it debugs the line of code that is apparently not there... It all seems ot be related to the IDE not being aware of paths outside the source folder (or something along those lines), but only for the IDE, not for the actual code?

0 Kudos
633 Views
CarlFST60L
Senior Contributor II

The problem is related to the IDE or some part of the development environment not being aware of the path's that the compiler is aware of. I have 100% got all the includes building and debugging as they should, but the IDE still shows the wrong information, it shows that the includes are unresolved that are not in the base source directory, it then makes everything a big problem for development as the IDE shows all your compile time option grayed out when they are included! Along with navigation, resource management etc.

 

There must be a project option to tell the IDE where to get its paths which is separate to the compiler, where is this? Why is it now separate from the compiler?

0 Kudos
633 Views
CrasyCat
Specialist III

Hello

 

Can you please try the following:

    - Click right on the project name in the CodeWarrior Projects View

    - In the drop down menu select Edit linked Resources Locations

    - Switch to the Linked Resources tab

   - Do you see your header files showing up in the Invalid Location group?

 

If this is the case, you need to fix the location associated with the header files.

Note that you can define a Path variable in the Path Variables tab and define the location relative to those variables if you want to keep the paths relatives.

 

CrasyCat

0 Kudos
634 Views
CarlFST60L
Senior Contributor II

Hi,

 

Thanks for the reply CrasyCat!

 

wow, i guess a reboot fixed it as it works exactly as expected, the exact project I was using above now works after a reboot..

 

Playing some more I cannot get the recursive path (-IR) to work, but manually adding every folder does work (today)...

0 Kudos