c++ - OpenGL 项目需要 DirectX 库文件

标签 c++ opengl directx

我安装了过剩版本 3.7,运行 Windows 7 并使用 VS 2010:

Screenshot

如果没有说明它需要 Direct X 库并包含在 VC++ 目录属性选项卡中,我似乎无法运行任何 C++ 程序。 在 propertes>input>additional dependencies 下,它显示 dxerr.lib 和其他一些 dx 库在继承值下,我认为这是导致此错误的原因。我怎样才能删除这些值?除非有人认为错误源于其他地方......

#include <stdlib.h>    
#include <GL\glut.h>
int main(int argc, char **argv) {   
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowPosition(100, 100);   
    glutInitWindowSize(720, 480);
    glutCreateWindow("First OpenGL Project");   
    return 1;
}

Error 1 error LNK1104: cannot open file 'dxerr.lib' c:\Users\mallaboro\documents\visual studio 2010\Projects\First OpenGL Project2\First OpenGL Project2\LINK First OpenGL Project2

最佳答案

试试maintained GLUT implementation而不是近 20 年前的软件。

关于c++ - OpenGL 项目需要 DirectX 库文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20981037/

相关文章:

c++ - 'D3DRS_SEPARATEDESTALPHAENABLE' : undeclared identifier - even though it's mentioned in the DirectX comments?

c++ - 在不同的着色器中使用相同的常量缓冲区

C++函数模板部分特化?

cocoa - 如何从 OpenGL 纹理创建 CVOpenGLTextureRef

c++ - OpenGL 近平面剪裁太多

c++ - 如何在 Windows CE Direct-X 应用程序中显示(打印机)对话框?

java - 在 OOP 中,Private 成员对谁来说是私有(private)的?

c++ - 有必要删除动态结构内容,然后删除结构本身吗?

c++ - Visual Studio C++ 能够编译并出现编译错误(红色下划线)

opengl - 如何将兼容 HDMI 1.4a 的立体信号从 OpenGL 应用程序输出到 3DTV?