# CUDA link error VS2008

**URL:** <https://forums.developer.nvidia.com/t/cuda-link-error-vs2008/10932>\
**Category:** CUDA Programming and Performance\
**Created:** [July 16, 2009, 6:16pm UTC](https://forums.developer.nvidia.com/t/cuda-link-error-vs2008/10932 "2009-07-16T18:16:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnzxr](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@johnzxr](https://forums.developer.nvidia.com/u/johnzxr)\
**Post date:** [July 16, 2009, 6:16pm UTC](https://forums.developer.nvidia.com/t/cuda-link-error-vs2008/10932/1 "2009-07-16T18:16:05Z")

</div>

Hi,

Apologies to adding to the never ending list of comiler and linker error posts on these boards, I have looked about but can’t find a solution that works for me.

I am running Windows 7(64) and have installed the 64 bit driver, SDK and toolkit. I can execute all the pre-built examples and compile, link and execute all the example projects.

So then i decided to make my own project, i followed the example this guy set out on his page  
[url=“[My first CUDA program! | /// Parallel Panorama ///](http://llpanorama.wordpress.com/2008/05/21/my-first-cuda-program/)”][http://llpanorama.wordpress.com/2008/05/21...t-cuda-program/[/url]](http://llpanorama.wordpress.com/2008/05/21...t-cuda-program/%5B/url%5D)

The problem i have is the code on that page compiles ok, but it won’t link. I get the error

error LNK2019: unresolved external symbol \_main referenced in function \_\_\_tmainCRTStartup

I have set all my include paths to point to the right locations, but I cant seem to figure out why this error is occuring. Any help greatly appreciated (and might stop me from going mad)

Thanks

John

---

<div class="post-metadata">

**Author:** ![johnzxr](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@johnzxr](https://forums.developer.nvidia.com/u/johnzxr)\
**Post date:** [July 16, 2009, 6:58pm UTC](https://forums.developer.nvidia.com/t/cuda-link-error-vs2008/10932/2 "2009-07-16T18:58:18Z")

</div>

Ok, resolved it.

My bad, a typo in the command line meant the created .obj file was not named correctly, thus the missing link.
