DSC compiler not finding linked files

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

DSC compiler not finding linked files

跳至解决方案
2,071 次查看
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 项奖励
回复
1 解答
2,054 次查看
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 项奖励
回复
3 回复数
2,056 次查看
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 项奖励
回复
2,057 次查看
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 项奖励
回复
2,055 次查看
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 项奖励
回复