Conditional Compiling

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

Conditional Compiling

4,443件の閲覧回数
timotay01
Contributor I
Is there a way to setup a conditional compile for the entire project typically done in a make file with -D ?
 
ラベル(1)
タグ(1)
0 件の賞賛
返信
4 返答(返信)

855件の閲覧回数
CrasyCat
Specialist III
Hello
 
Which processor are you targeting (HC08, HC12, ...)?
Are you planning to build from the IDE or from a make file?
 
CrasyCat
0 件の賞賛
返信

855件の閲覧回数
timotay01
Contributor I
Sorry, build from IDE, and part is CF5208
0 件の賞賛
返信

855件の閲覧回数
CrasyCat
Specialist III

If you are using CodeWarrior for Coldfire V6.x you can just add the #define corresponding to the macro you want to define in the target settings "C/C++ Preprocessor Panel".

This panel can be found in the target setting dialog. Press ALT + F7 to open the dialog.

If you are using an older version of the tools, you have to go through a prefix file.
A prefix file is a header file which is included in each ANSI C source file.

Macros are defined there using #define and you specify the name of your prefix file in the target "C/C++ Language Panel".

I hope this helps.

CrasyCat

0 件の賞賛
返信

855件の閲覧回数
timotay01
Contributor I
Yes that was what I was looking for thanks.
0 件の賞賛
返信