开发 IL 链接和编译错误 (0xc000007b)

Dev IL linking and compiling error (0xc000007b)

本文关键字:0xc000007b 错误 编译 IL 链接 开发      更新时间:2023-10-16

我正在努力使这个项目工作 链接到灯塔



首先是一堆信息:

我正在使用:Windows 7 Pro 64 位和 Visual Studio 2013 Ultimate
(我相信默认设置的项目是 32 位)

关于库:
魔鬼:我下载并安装了这个适用于 32 位 Windows
的 DevIL 1.7.8 SDKAssimp: assimp--3.0.1270-sdk

项目设置:
平台:活动(Win32)
配置:所有配置

库目录:
C:\assimp--3.0.1270-sdk\lib\assimp_release-dll_win32;C:\DevIL\lib

包含目录:
C:\assimp--3.0.1270-sdk\include;C:\DevIL\include

库目录:
C:\assimp--3.0.1270-sdk\lib\assimp_release-dll_win32;C:\DevIL\lib

C/C++ -> 常规 -> 其他包含目录:
C:\assimp--3.0.1270-sdk\include;C:\DevIL\include

链接器 -> 输入 -> 其他依赖项:
%(其他依赖项)



好的,现在当我编译我的项目时,我收到错误:

Application was unable to start correctly(0xc000007b)
The program '[16912] AssimpModelImport Demo.exe' has exited with code -1073741701 (0xc000007b)

通过注释掉代码行(无法调试),我找到了错误发生的位置:

#define GLEW_STATIC
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <ILil.h>

#include "assimp/Importer.hpp"
#include "assimp/PostProcess.h"
#include "assimp/Scene.h"
#include <math.h>
#include <fstream>
#include <map>
#include <string>
#include <vector>

#ifdef _WIN32
#pragma comment(lib,"glew32.lib")
#pragma comment(lib,"assimp.lib")
#pragma comment(lib, "DevIL.lib")
#endif
[...] bunch of functions [...]
int main(int argc, char **argv) {
    [...]
        IlInit(); // DevIL initialisation // ERROR
    [...]   
}

有人知道这里发生了什么吗?我该如何解决这个问题?
我想使用此代码的一部分来渲染 3D *。我的 OpenGL 3.3 项目中的 OBJ 模型。


如果需要,这是我的调试日志:

'AssimpModelImport Demo.exe' (Win32): Loaded 'C:UsersXXXXXDesktopL3DAssimpModelImport DemoReleaseAssimpModelImport Demo.exe'. Symbols loaded.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64ntdll.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64kernel32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64KernelBase.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:Program FilesBitdefenderAntivirus Free Editionavc3avc3_sig_271avcuf32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:UsersXXXXXDesktopL3DAssimpModelImport DemoReleasefreeglut.dll'. Module was built without symbols.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64user32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64gdi32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64lpk.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64usp10.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64msvcrt.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64advapi32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64sechost.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64rpcrt4.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64sspicli.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64cryptbase.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64opengl32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64glu32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64ddraw.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64dciman32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64setupapi.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64cfgmgr32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64oleaut32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64ole32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64devobj.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64dwmapi.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64winmm.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64msvcp120.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:WindowsSysWOW64msvcr120.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:UsersXXXXXDesktopL3DAssimpModelImport DemoReleaseAssimp32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:Windowswinsxsx86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57msvcp90.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:Windowswinsxsx86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57msvcr90.dll'. Cannot find or open the PDB file.
The program '[19340] AssimpModelImport Demo.exe' has exited with code -1073741701 (0xc000007b).

首先,错误不是编译器或链接器错误。 该错误是运行时错误。

您正在运行 32 位应用程序,但SysWOW64目录指示您正在尝试为 32 位程序加载 64 位组件。 这当然是行不通的。

错误可能有多种原因,但您应该检查的第一个原因是您的项目设置。 也许某处正在使用x64,导致遇到对 64 位 DLL 的依赖关系。

如果所有其他方法都失败了,请使用诸如依赖沃克 http://www.dependencywalker.com/

并检查您的 EXE 文件以确保它是 32 位可执行文件,并查看依赖 DLL。