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

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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AaeshahAuthor 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 .
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.