您的第二个方法我试过了,但当调试的时候又出现这样的错误
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutSwapBuffers@0,该符号
在函数 “void __cdecl display(void)” (?display@@YAXXZ) 中被引用
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutDisplayFunc@4,该符号
在函数 “bool __cdecl initGL(int *,char * *)” (?initGL@@YA_NPAHPAPAD@Z) 中被引用
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutCreateWindow@4,该符
号在函数 “bool __cdecl initGL(int *,char * *)” (?initGL@@YA_NPAHPAPAD@Z) 中被引用
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutInitWindowSize@8,该符
号在函数 “bool __cdecl initGL(int *,char * *)” (?initGL@@YA_NPAHPAPAD@Z) 中被引用
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutInitDisplayMode@4,该符
号在函数 “bool __cdecl initGL(int *,char * *)” (?initGL@@YA_NPAHPAPAD@Z) 中被引用
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutInit@8,该符号在函
数 “bool __cdecl initGL(int *,char * *)” (?initGL@@YA_NPAHPAPAD@Z) 中被引用
1>kernel.cu.obj : error LNK2019: 无法解析的外部符号 __imp__glutMainLoop@0,该符号在
函数 “bool __cdecl runTest(int,char * *,char *)” (?runTest@@YA_NHPAPADPAD@Z) 中被引用
1>E:\cuda_gl_mfc\cuda5.0_gl\Debug\cuda5.exe : fatal error LNK1120: 7 个无法解析的外部命
令
这该如何解决啊?以前遇到这样的问题,只要把库的顺序调换一下就好了,但这个我调换了却不行。