CodeWarrior 6.2 Not Recognizing `typedef` and User-defined Types

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

CodeWarrior 6.2 Not Recognizing `typedef` and User-defined Types

ソリューションへジャンプ
1,690件の閲覧回数
jimfell
Contributor III

I am using CodeWarrior 6.2, and it's not recognizing the `typedef` keyword or any user-defined types.  Right now I'm just trying to compile a workspace made with the New Project Wizard.  For example, the first error it gives:

 

Error   : declaration syntax error

(included from:

cstddef:24

stddef.h:17

hidef.h:22

main.c:1)

size_t.h line 28     typedef _MSL_SIZE_T_TYPE size_t; 

 

This seems highly unusual to me.  Any ideas?

 

ラベル(1)
0 件の賞賛
返信
1 解決策
1,311件の閲覧回数
jimfell
Contributor III

This issue has been resolved.

The problem was a result of how I was defining pre-defined constants in the project settings.  I had entered one contant per line, which is how other compilers do this, but the textbox for predefined symbols actually needs to be treated as if it were a text file.  Each symbol needs to be entered as `#define SYMBOL`.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,312件の閲覧回数
jimfell
Contributor III

This issue has been resolved.

The problem was a result of how I was defining pre-defined constants in the project settings.  I had entered one contant per line, which is how other compilers do this, but the textbox for predefined symbols actually needs to be treated as if it were a text file.  Each symbol needs to be entered as `#define SYMBOL`.

0 件の賞賛
返信
1,311件の閲覧回数
CrasyCat
Specialist III

Hello

I would suggest you to generate the preprocessor listing for the source file you are trying to build.

Open the file in an edit window click right inside of the file and select preprocess.

There might be some unexpected macro substitution in your code.

The preprocessor listing will present you the code the compiler is seeing after all macros and includes  have been expanded.

This might help you determine where the problem is.

CrasyCat

0 件の賞賛
返信