我找到了这个教程,但是当我将代码复制到我的 C++ 项目时,出现了很多错误:
-------------- Build: Debug in Tekstury123 ---------------
Compiling: main.cpp
C:\Users\piotrek\Documents\CodeBlocks Projects\Tekstury123\main.cpp:7: warning: ignoring #pragma comment
Linking console executable: bin\Debug\Tekstury123.exe
obj\Debug\main.o: In function `main':
C:/Users/piotrek/Documents/CodeBlocks Projects/Tekstury123/main.cpp:20: undefined reference to `_imp__ilInit@0'
C:/Users/piotrek/Documents/CodeBlocks Projects/Tekstury123/main.cpp:24: undefined reference to `_imp__ilLoadImage@4'
C:/Users/piotrek/Documents/CodeBlocks Projects/Tekstury123/main.cpp:34: undefined reference to `_imp__ilGetError@0'
C:/Users/piotrek/Documents/CodeBlocks Projects/Tekstury123/main.cpp:36: undefined reference to `_imp__ilGetString@4'
C:/Users/piotrek/Documents/CodeBlocks Projects/Tekstury123/main.cpp:39: undefined reference to `_imp__ilGetInteger@4'
C:/Users/piotrek/Documents/CodeBlocks Projects/Tekstury123/main.cpp:41: undefined reference to `_imp__ilGetData@0'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
6 errors, 1 warnings
我该如何解决这个错误?你能帮助我吗?
我使用 Windows,代码::块。