DSC compiler not finding linked files

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

DSC compiler not finding linked files

ソリューションへジャンプ
2,077件の閲覧回数
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,060件の閲覧回数
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,062件の閲覧回数
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,063件の閲覧回数
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,061件の閲覧回数
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 件の賞賛
返信