Error when starting GLUT app when compiled for 64 bit
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:
The application was unable to start correctly (0xc000007b). Click OK to close the application.
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"
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开发者_StackOverflow中文版 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;
}
Are you linking with the correct (64-bit) version of the library, and is the correct (64-bit) dll available on the path?
All you have to do is add executable path of your project: c:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\bin\win64\Debug (or whatever config you're on)
This is where glut32.dll and glew64.dll are located. Better still, copy these DLLs to your local project folder.
This is how I just solved the same error.
精彩评论