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

  • Home
  • SEARCH
  • 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 8413677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:57:49+00:00 2026-06-10T00:57:49+00:00

I want to build a cuda plugin for an other project written in C++

  • 0

I want to build a cuda plugin for an other project written in C++ using MPI.
I got the following situation:

  • startingpoint.cpp is a c++ file including the cudaintegrator.h and
    includes datastructure.h
  • cudaintegrator.h is the header file for a
    cuda file including datastructure.h
  • cudaintegrator.cpp is the
    implemenation of cudaintegrator.h
  • datastructure.h is a header file
    specifing some datastructures

the files are organized like that:

/trunk/
   /src
      /folder1
         /folder2
            /startingpoint.cpp
         /folder3 
            /cudaintegrator.h
            /cudaintegrator.cpp
      /folder4
         /folder5
            /datastructure.h

When I run nvcc from my trunk dir with the following command:

/usr/local/cuda/bin/nvcc   -c -o src/folder1/folder3/cudaintegrator.o src/folder1/folder3/cudaintegrator.cu

the included file `#include “folder4/folder5/datastructure.h” is not found:

src/folder1/folder2/cudaintegrator.h:12:33: fatal error: folder4/folder5/datastructure.h: No such file or directory

When I run mpic++ for the compilation of startingpoint.cpp, which uses the same include, the datastructure.h is found.

I suspect that the working directory of nvcc and mpic++ are somehow different(?) even both are run from the trunk directory.
When I change the include to ../../folder4/folder5/datastructure.h the file itself is found, but subsequent includes fail for the same reason. I can not change the includes in all subsequent files because they can’t be found by mpic++ in this case.
Does anyone have a suggestion how I should include the files in this situation correctly, or how to instruct nvcc to find the included files?

  • 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-10T00:57:50+00:00Added an answer on June 10, 2026 at 12:57 am

    Providing include paths (-I) to the nvcc invocation should be enough (if not, it uses relative include paths only, that’s why adding ../.. works for a single include).

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

Sidebar

Related Questions

I want to build an local iPhone project without source control using jenkins. However
I want to build my solution file using MSBuild but there is one issue.
I want to build a console-like output using JTextPane. Therefore I am using a
i want build a blog using jekyll and octopress. but an error happened when
Want to build up a csv file, call up the default email app and
I want to build an application using Hibernate and MyBatis integrate with Spring. In
I want build a query to return a list of project IDs for the
I want to build a RESTful WebService that's using JSON for externalizing resources. The
I want to build a library from multiple source files, like a1.cpp a2.cpp. I
I want to build a mobile app using jQuery Mobile. The App should have

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.