We help IT Professionals succeed at work.

CUDA - Link unresolved externals      .exe even after link the libraries

Aaeshah
Aaeshah asked
on
I am new in using CUDA my attempts to build and run some examples that I found went all bad because of linking error I try to solve them but I got these two errors which won't solve with me even after adding the necessary libraries in Linker->input.

glew64.lib;glut32.lib;glew32.lib;freeglut.lib;cudart.lib

Error   2   error LNK1120: 1 unresolved externals   D:\IUPUI\CSCI50400\CUDA\volumeRenderA\Debug\volumeRenderA.exe   volumeRenderA
Error   1   error LNK2019: unresolved external symbol __imp__glutCloseFunc@4 referenced in function _main   D:\IUPUI\CSCI50400\CUDA\volumeRenderA\volumeRenderA\volumeRender.obj    volumeRenderA

Open in new window

VolumeRender.jpg
LinkerInput.jpg
Comment
Watch Question

Top Expert 2016
Commented:
you may try to open the glut32.lib and freeglut.lib with hex editor in visual studio (use open with ...).

then search for text 'glutCloseFunc'. if you don't find the function check all other libraries available.

if the .lib was found where the function was defined, you may check the linker - input - additional dependencies whether it contains the lib, whether it was spelled correctly and whether the path to the library was defined.

Sara

Author

Commented:
Thank you, your answer give me the solution by using one of these two libraries either glut32.lib or freeglut.lib and by deleting glut32.lib the program works .