We help IT Professionals succeed at work.

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

Aaeshah asked
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.


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

Watch Question

Top Expert 2016
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.



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 .