好的,事情就是这样。我有我需要的所有 IL 文件,即
DevIL.dll
DevIL.lib
ILU.dll
ILU.lib
ILUT.dll
ILUT.lib
config.h
config.h.in
devil_cpp_wrapper.h
devil_internal_exports.h
il.h
ilu.h
ilu_region.h
ilut.h
ilut_config.h
我的项目目录是这样的,假设我的项目名称是“Project1”
|-Debug---Project1.pdb
|
| |---Debug---[loads of files]
| |
| |---Glut---[OpenGL files]
| |
| |---IL---[all the files mentioned above]
|-Project1---|
| |---image.bmp
Project Folder---| |
| |---[header and .cpp files I made in the project]
| |
| |---[files produced by Visual Studio]
|
|-ipch---[unrelated stuff]
|
|-Project1.sln
|
|-[other files VS created]
如前所述,我已将所有 DevIL 文件放在 IL 文件夹中,并且我确信我正在使用它们的 unicode 兼容版本,因为我正在为项目使用 Unicode 字符集。在我的“其他依赖项”中,我有
ilut.lib; ilu.lib; DevIL.lib;
所以,依赖关系在那里,我知道这不是问题。
毕竟,我仍然遇到链接器错误,主要是LNK2019:unresolved external symbol__imp_
针对所有 IL 函数。
我错过了什么?在我看来,这可能与项目属性或文件本身有关......也许我错过了一个文件?
编辑:这是输出消息
1>------ Build started: Project: Final Year Project, Configuration: Debug Win32 ------
1>Build started 29/4/2011 12:46:04 pm.
1>InitializeBuildStatus:
1> Touching "Debug\Final Year Project.unsuccessfulbuild".
1>ClCompile:
1> Main.cpp
1>c:\users\xxxx\desktop\final year project 0.2\final year project\main.cpp(152): warning C4390: ';' : empty controlled statement found; is this the intent?
1>c:\users\xxxx\desktop\final year project 0.2\final year project\main.cpp(141): warning C4101: 'alpha' : unreferenced local variable
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilInit@0 referenced in function "public: static void __cdecl Main::Init(int,char * *)" (?Init@Main@@SAXHPAPAD@Z)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilDeleteImages@8 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilGetData@0 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilConvertImage@8 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilGetInteger@4 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilLoadImage@4 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilBindImage@4 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__ilGenImages@8 referenced in function "public: static void __cdecl Main::DisplayScene(void)" (?DisplayScene@Main@@SAXXZ)
1>C:\Users\xxxx\Desktop\Final Year Project 0.2\Debug\Final Year Project.exe : fatal error LNK1120: 8 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.93
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========