Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C/C++ Preprocessing Error

Tags:

c++

c

I stumble on a compiling error:

Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/3dsloader.d"-MT"src/3dsloader.d" -o "src/3dsloader.o" "../src/3dsloader.c"
In file included from ../src/3dsloader.c:42:
../src/3dsloader.h:8:9: error: macro names must be identifiers
make: *** [src/3dsloader.o] Error 1

it points to:

#ifndef 3DSLOADER_H_
#define 3DSLOADER_H_

With the following message:

Multiple markers at this line
    macro names must be identifiers
    macro definition not found: #ifndef 3DSLOADER_H_ 

I am running the C/C++ OpenGL Program on Ubuntu with Eclipse IDE. All other programs so far are working fine. But this one to load a 3DS file is mocking around with me already for two days with no fix on it.

Any suggestion? All comments are highly appreciated!

like image 280
ThreaderSlash Avatar asked Sep 30 '11 08:09

ThreaderSlash


1 Answers

C identifiers may not start with a number. Try _H_3DSLOADER instead.

To be exact: They may only start with letters or an underscore.

like image 150
alk Avatar answered Sep 27 '22 21:09

alk