cannot link glut.lib using cygwin
Hi

I am getting an error linking freeglut.lib when using cl.exe (VS 2010) and cygwin on Windows 7:

error LNK2019: unresolved external symbol _glutCreateWindow referenced in function "void __cdecl my_function()....

I can link with the CUDA library because CUDA function names are mangled in both my object code and the CUDA library.
However, I [u]cannot[/u] link with the glut library because the names are mangled in the library, but not in my object code:

In my object file:
U _cudaThreadExit@0
U _glutInitWindowSize

In cudart.lib:
00000000 T _cudaThreadExit@0

In freeglut.lib:
00000000 T _glutInitWindowSize@8

Does anyone know what is wrong?

cheers
steve
Hi



I am getting an error linking freeglut.lib when using cl.exe (VS 2010) and cygwin on Windows 7:



error LNK2019: unresolved external symbol _glutCreateWindow referenced in function "void __cdecl my_function()....



I can link with the CUDA library because CUDA function names are mangled in both my object code and the CUDA library.

However, I cannot link with the glut library because the names are mangled in the library, but not in my object code:



In my object file:

U _cudaThreadExit@0

U _glutInitWindowSize



In cudart.lib:

00000000 T _cudaThreadExit@0



In freeglut.lib:

00000000 T _glutInitWindowSize@8



Does anyone know what is wrong?



cheers

steve

#1
Posted 04/25/2012 05:31 AM   
Scroll To Top