Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8052397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:32:08+00:00 2026-06-05T07:32:08+00:00

I am trying to create a Cuda project in VisualStudio 2010. I have created

  • 0

I am trying to create a Cuda project in VisualStudio 2010. I have created one simple test .cu file which takes an array and adds 1 to all its element and sends the result back to the host.

I have added cudart.lib file to the Linker.

In the .cu code I have included #include cuda_runtime.h header.

But when I am trying to compile it, it’s giving the two errors.

error C2065 :’threadIdx’: undeclared identifier
error C2059: syntax error:'<‘

After installing Nvidia Nsight Visual Studio edition and setting the item type of .cu file as CUDA C/C++,it starts giving two additional errors:

error D8003:missing source filename

error MSB3721: The command “”C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.exe” -gencode=arch=compute_10,code=\”sm_10,compute_10\” –use-local-env –cl-version 2010 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin” -I”C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.2\C\common\inc” -I”C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.2\shared\inc” -I”C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\include” -G –keep-dir “Debug” -maxrregcount=0 –machine 32 –compile -g -Xcompiler “/EHsc /nologo /Od /Zi /MDd ” -o “Debug\test.cu.obj” “\ucigrad.local\Users\AGill\My Documents\Visual Studio 2010\Projects\cudatest\cudatest\test.cu”” exited with code 2.

Please help me how to resolve it. I think there may be some issue with nvcc compiler in VS2010 but I’m not able to figure it out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:32:09+00:00Added an answer on June 5, 2026 at 7:32 am

    The errors you get most likely indicate that you’re not compiling your CUDA sources with NVCC. Make sure that you are, either by selecting the appropriate item type (CUDA C/C++) if you have installed the Visual Studio integration when installing the toolkit. Or make sure you have set up appropriate build rules for your sources.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to create simple package with one procedure: CREATE OR REPLACE PACKAGE PACKAGE1 AS
I am trying create a data.frame from which to create a graph. I have
I'm trying create simple application in C++. This application has to read from file
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Trying to create a prayer time app for prayertimes in Oslo. I have a
I'm trying create a simple bookmarklet to capture the title and url of a
hi I'm trying create chat using node.js I see example in http://chat.nodejs.org/ I have
I'm trying create a new file with a Java Applet, but I don't know
I am tryint to integrate CUDA in an existing project, in which several libs
Problem I'm trying to create an CUDA application that is well integrated with .net.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.