当编译为64位时启动GLUT应用程序时出错 [英] Error when starting GLUT app when compiled for 64 bit
问题描述
我有一个GLUT应用程序的裸骨。当我为Win32编译它的工作正常,但如果我编译它为x64我得到这个错误:
I have the bare bones of a GLUT app. When I compile it for Win32 it works fine, but if I compile it for x64 I get this error:
应用程序无法正确启动(0xc000007b)。单击确定关闭应用程序。
我有 glut64.lib
对于链接器,它来自nVidia CUDA sdk在C:\ProgramData\NVIDIA公司\NVIDIA GPU计算SDK \C\common\lib
I have glut64.lib
as an input for the Linker, which comes from the nVidia CUDA sdk at "C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\lib"
我想将OpenGL与CUDA结合使用,虽然这个裸机应用程序没有对CUDA的引用。我在Windows 7 64位上运行Visual Studio 2008.
I want to use OpenGL in conjunction with CUDA, though this bare bones app has no references to CUDA. I am running Visual Studio 2008 on Windows 7 64 bit.
您可以提供的任何洞察力都会感激。
Any insight you can provide will be appreciated.
Main.cpp:
#include <GL/glut.h>
void renderScene(void)
{
}
int main( int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
glutInitWindowPosition(100, 100);
glutInitWindowSize(320,320);
glutCreateWindow("CUDA Sandbox");
glutDisplayFunc(renderScene);
glutMainLoop();
return 0;
}
推荐答案
(64位)版本的库,并且是路径上可用的正确(64位)dll?
Are you linking with the correct (64-bit) version of the library, and is the correct (64-bit) dll available on the path?
这篇关于当编译为64位时启动GLUT应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!