I have a C project I’m importing to eclipse to work with. It was prewritten but not a C program, so I imported it as a C Makefile program. Actually for some reason the program was written with shell scripts which called the make in the appropriate directories, I added a Makefile that called the shell script, though I’ll probably change it to use only make files.
Anyways the unusual thing is that I get exceptions on all the #define variables used in my C code. The variables are defined in a .h file which is included on the top of the C code, and the #include doesn’t haev a warning. I can compile the code and run it without exception. Yet I still get dozens of errors where the #define values are used in the editor. The .h which defines the variables is in a different folder then the C code that throws the excception, but adding the folder with the .h into the C include path didn’t do any good. Anyone know how I can get the editor to play nice with my #define variables?
Here are some options to investigate the issue further:
Properties->C/C++ General->Paths and Symbols->Symbols. You can check the symbols defined there, maybe something is messing up the preprocessor there.-save-temps. This will output some intermediate compilation files. Check the.ior.iifiles – these contain the preprocessed output. More information on this g++ option is here.Also, it would be nice if you could give some more information about the actual errors/warnings.