-1

我正在努力使这个项目工作Link to Lighthouse



首先是一堆信息:

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

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

项目设置:
平台: Active(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

链接器 -> 输入 -> 附加依赖项:
%(AdditionalDependencies)



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

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 <IL\il.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
    [...]   
}

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


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

'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Users\XXXXX\Desktop\L3DAssimpModelImport Demo\Release\AssimpModelImport Demo.exe'. Symbols loaded.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Program Files\Bitdefender\Antivirus Free Edition\avc3\avc3_sig_271\avcuf32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Users\XXXXX\Desktop\L3DAssimpModelImport Demo\Release\freeglut.dll'. Module was built without symbols.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ddraw.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dciman32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp120.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Users\XXXXX\Desktop\L3DAssimpModelImport Demo\Release\Assimp32.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll'. Cannot find or open the PDB file.
'AssimpModelImport Demo.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll'. Cannot find or open the PDB file.
The program '[19340] AssimpModelImport Demo.exe' has exited with code -1073741701 (0xc000007b).
4

1 回答 1

2

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

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

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

如果一切都失败了,请使用 Dependency Walker http://www.dependencywalker.com/之类的程序

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

于 2014-11-28T02:27:38.137 回答