DSC compiler not finding linked files

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

DSC compiler not finding linked files

Jump to solution
1,192 Views
pgillaspy
Contributor III

I am using 56F83789-EVK with DSC compiler on CW 11.1.

First, I linked a directory into my project. The directory contains common code, specifically my own file, std.h.  My main.c has #include "std.h", but the compiler is unable to find std.h even though quite clearly the compile command line for main.c has the -i include directive to the the linked directory. If I change the include to be the absolute full path to std.h, the compiler finds std.h. What is the problem here?

Secondly, std.h contains #include <stdbool.h>. The compiler complains it can't open stdbool.h even though quite clearly the compiler command line for main.c has the -i include directive to C:\Freescale\CW MCU v11.1\MCU\M56800E Support\msl\MSL_C\MSL_Common\Include wherein stdbool.h resides. In this scenario, I am using the absolute full path to std.h so the compiler finds std.h.  What is the problem here?

Thank you for any help.

0 Kudos
1 Solution
1,175 Views
pgillaspy
Contributor III

The issue with std.h is resolved as follows:  you may create a linked directory in your project so as to be able to view and edit the source code in the linked directory, but the include path to that directory cannot be the linked directory path, it must be the path to the real directory.

View solution in original post

0 Kudos
3 Replies
1,177 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Frankly speaking, I never see the std.h header file. I also searched the CW Help, it gave me no result.

I suppose there are two header files normally as the following.

#include <stdio.h>
#include <stdlib.h>

#include "derivative.h" /* include peripheral declarations */

If it is not what you expected, pls send us your project so that we can try to compile it.

BR

XiangJun Rong

0 Kudos
1,178 Views
pgillaspy
Contributor III

The issue with stdbool.h was solved by adding the directory path to CW's Project settings for 'systems' files search path.

0 Kudos
1,176 Views
pgillaspy
Contributor III

The issue with std.h is resolved as follows:  you may create a linked directory in your project so as to be able to view and edit the source code in the linked directory, but the include path to that directory cannot be the linked directory path, it must be the path to the real directory.

0 Kudos