C/C++预处理错误

Thr*_*ash 5 c c++

我偶然发现了一个编译错误:

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
Run Code Online (Sandbox Code Playgroud)

它指向:

#ifndef 3DSLOADER_H_
#define 3DSLOADER_H_
Run Code Online (Sandbox Code Playgroud)

通过以下消息:

Multiple markers at this line
    macro names must be identifiers
    macro definition not found: #ifndef 3DSLOADER_H_ 
Run Code Online (Sandbox Code Playgroud)

我正在使用Eclipse IDE在Ubuntu上运行C/C++ OpenGL程序.到目前为止所有其他程序都运行正常.但是这个加载3DS文件的人已经和我一起嘲笑了两天而没有修复它.

有什么建议吗?所有评论都非常感谢!

alk*_*alk 9

C标识符不能以数字开头.请尝试使用_H_3DSLOADER.

确切地说:它们可能只以字母或下划线开头.