我有一个项目,我正在Code :: Blocks(它是一个DLL文件),它将无法正确编译。 Code :: Blocks表示项目中的文件不存在。 我正在运行Code :: Blocks 13.12。
注意:为了隐私目的,我用#替换了项目名称和文件扩展名。 注意:文件ntoskrnl.h存在,并且在项目中。这就是我所说的。
构建日志:
-------------- Build: Release in (compiler: GNU GCC Compiler)---------------
[ 0.3%] mingw32-gcc.exe -fexpensive-optimizations -O3 -DBUILD_DLL -fexpensive-optimizations -O3 -c \Source\Kernel\cache\cachesub.c -o output\Source\Kernel\cache\cachesub.c.o
[ 0.5%] mingw32-gcc.exe -fexpensive-optimizations -O3 -DBUILD_DLL -fexpensive-optimizations -O3 -c \Source\Kernel\cache\copysup.c -o output\Source\Kernel\cache\copysup.c.o
[ 0.8%] mingw32-gcc.exe -fexpensive-optimizations -O3 -DBUILD_DLL -fexpensive-optimizations -O3 -c \Source\Kernel\cache\fssup.c -o output\Source\Kernel\cache\fssup.c.o
[ 1.1%] mingw32-gcc.exe -fexpensive-optimizations -O3 -DBUILD_DLL -fexpensive-optimizations -O3 -c \Source\Kernel\cache\lazyrite.c -o output\Source\Kernel\cache\lazyrite.c.o
[ 1.4%] mingw32-gcc.exe -fexpensive-optimizations -O3 -DBUILD_DLL -fexpensive-optimizations -O3 -c \Source\Kernel\cache\logsup.c -o output\Source\Kernel\cache\logsup.c.o
\Source\Kernel\cache\cachesub.c:12:22: fatal error: ntoskrnl.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 1 second(s))
\Source\Kernel\cache\copysup.c:11:22: fatal error: ntoskrnl.h: No such file or directory
\Source\Kernel\cache\fssup.c:12:22: fatal error: ntoskrnl.h: No such file or directory
\Source\Kernel\cache\lazyrite.c:11:22: fatal error: ntoskrnl.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 1 second(s))
compilation terminated.
Process terminated with status 1 (0 minute(s), 1 second(s))
compilation terminated.
Process terminated with status 1 (0 minute(s), 1 second(s))
\Source\Kernel\cache\logsup.c:11:22: fatal error: ntoskrnl.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 1 second(s))
5 error(s), 0 warning(s) (0 minute(s), 1 second(s))
请帮助!
答案 0 :(得分:1)
检查您的搜索目录,确保找到所有标题所在的目录。
右键单击项目并转到构建选项 - >搜索目录。从那里您将看到3个选项卡,编译器,链接器和资源编译器。确保添加正确的目录,以便编译器,链接器和资源编译器分别可以找到项目所需的文件。