本文介绍了Dev IL链接和编译错误(0xc000007b)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使该项目正常运行链接到灯塔


I'm trying to make this project work Link to Lighthouse


首先是一堆信息:

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

I'm using:Windows 7 Pro 64-bit and Visual Studio 2013 Ultimate
(Project on default settings which I believe is 32-bit)

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

About libraries:
DevIL: I downloaded and installed this one DevIL 1.7.8 SDK for 32-bit Windows
Assimp: 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

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


Project settings:
Platform: Active(Win32)
Configuration: All Configurations

Library Directories:
C:\assimp--3.0.1270-sdk\lib\assimp_release-dll_win32;C:\DevIL\lib

Include Directories:
C:\assimp--3.0.1270-sdk\include;C:\DevIL\include

Library Directories:
C:\assimp--3.0.1270-sdk\lib\assimp_release-dll_win32;C:\DevIL\lib

C/C++ -> General -> Additional Include Directories:
C:\assimp--3.0.1270-sdk\include;C:\DevIL\include

Linker -> Input -> Additional Dependencies:
%(AdditionalDependencies)


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

OK, now when I compile my project I receive error:

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


通过注释掉几行代码(不能进行调试),我发现了发生错误的地方:


By commenting out lines of code (cant debug) I've found out where the error occurs:

#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模型.

Anyone knows what's happening here? How can I solve this?
I want to use parts of this code to render 3D *.OBJ models in my OpenGL 3.3 project.

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

'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).

推荐答案

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

First, the error is not a compiler or linker error. That error is a runtime error.

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

You are running a 32-bit application, but the SysWOW64 directory indicates you're attempting to load 64-bit components for the 32-bit program. This of course will not work.

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

There could be several reasons for the error, but the first one you should inspect are your project settings. Maybe somewhere x64 is being used, causing a dependency on the 64-bit DLL's to be encountered.

如果所有其他方法均失败,请使用Dependency Walker等程序 http://www.dependencywalker.com/

If all else fails, please use a program such as Dependency Walker http://www.dependencywalker.com/

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

and inspect your EXE file to ensure it is a 32-bit executable, and also to view the dependent DLL's.

这篇关于Dev IL链接和编译错误(0xc000007b)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 13:43