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

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

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

Jump to solution
799 Views
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?

 

Labels (1)
0 Kudos
1 Solution
420 Views
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`.

View solution in original post

0 Kudos
2 Replies
421 Views
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 Kudos
420 Views
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 Kudos