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 8939505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:50:23+00:00 2026-06-15T10:50:23+00:00

I am trying to compile a cuda program which uses cusparse library. I am

  • 0

I am trying to compile a cuda program which uses cusparse library. I am getting linking error:

kernel.cu.obj : error LNK2019: unresolved external symbol _cusparseSetMatIndexBase@8 referenced in function _main

And a lot of error of same kind related to cusparse library. I have included “cusparse_v2.h”.
How do i link cusparse library in visual studio 2010 during compilation?

  • 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-15T10:50:23+00:00Added an answer on June 15, 2026 at 10:50 am

    The general instructions for linking libraries is not specific to CUDA. So you may want to learn more about using MS VS. Anyway, the steps are like this:

    1. Make sure you have opened the project that you want to work on.
    2. Select View…Property Pages (from the menu) A new dialog box will open up.
    3. On the left hand side of this dialog box, select Linker to open up it’s sub-menu
    4. Under linker, select Input
    5. Now, on the pane on the right, observe the first item which is “Additional Dependencies”. I believe cudart.lib should already be present there.
    6. Click to the right of cudart.lib You can now type in new libraries to be added. Type a space (to separate from cudart.lib) and type cusparse.lib
    7. Now click “Apply” in the lower right corner of the dialog box.

    That should be all that’s needed, if your project/solution file is already set up using a cuda template. If cudart.lib is not present, or your project/solution files do not already comprehend cuda, that is a separate issue. In that case I would recommend starting over, by cloning a project from the Samples, and building your project using that as a starting point. It will then pick up all the proper directories to search as well as the cuda build rules. Since all the main cuda libraries (cudart, cublas, cufft, cusparse, etc.) are all in the same location, the same search path should pick any of them up as needed.

    If you wanted to link another library, such as cublas.lib, for example, you could follow a similar sequence, replacing cusparse.lib above with cublas.lib

    Note that with newer versions of CUDA (e.g. CUDA 7.5) it will be necessary to build a 64-bit project only (follow the above steps when modifying the x64 project properties.) CUDA 7.5 and beyond are dropping support for 32-bit projects.

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

Sidebar

Related Questions

Trying to compile a iPhone/iPad application with SDK3.2 and am getting this error: Undefined
When trying to compile GNU software on HP-UX (binutils for example) I'm getting error
I'm trying to compile a CUDA test program on Windows 7 x64 via Command
I'm trying to compile some code. Here is the error I'm getting: error while
When trying to compile with Xcode, I am getting the following error: Undefined symbols
While trying to compile a 64 bit linux kernel using gcc, I see the
When trying to compile the following code, I am getting a warning that line
While trying to compile my project, that uses some third party headers, with mingw
I'm trying the hello world program of CUDA programming: adding two vectors together. Here's
Im trying to compile a simple class library project,its from Source Safe. However,when i

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.