CUDA using Eclipse CDT (C++ Development Tool)

CUDA’s sample projects uses some automated makefile which is not initially usable by Eclipse.

1. Create Eclipse Makefile Project

2. Modify

By default, CUDA’s makefile includes When I try to use the makefile, Eclipse complains “no target error”
So, I just added “all: $(TARGET)” in the target section in

Then, I tried Eclipse again. It complains “nvcc” not found. Great. Just modify nvcc into /usr/local/cuda/nvcc

Finally, everything works great.
Be sure that existing projects doesn’t have any side effects by modifying

My environment:
Mac Book Pro (Intel)
OS: OS X 10.5.2 (Leopard)
GPU: 8600M GT 128MB
IDE: Eclipse CDT (eclipse-cpp-europa-winter-macosx-carbon)

Posted in CUDA, MPMD. Tags: , , . 8 Comments »

8 Responses to “CUDA using Eclipse CDT (C++ Development Tool)”

  1. Jeff Says:

    Could you be a little more specific about the structure of the project in Eclipse? ie. Where does the fit in? Did you write your own make file? Last, how did you modify the project to point to nvcc? Thanks for your reply. i have the same environment but its driving me nuts.

  2. genki Says:

    1. Where is
    The comes with CUDA SDK
    /installed path/CUDA/NVIDIA CUDA SDK/common/
    (XP or Vista version do not have this)

    2. Did I write Makefile?
    No, I didn’t write any Makefile but I used the same Makefile included in the SDK’s projects. I just put my Eclipse project in the same place with SDK’s projects directory to avoid any relative path problem of Makefile.

    3. How to modify the nvcc in the
    If you see the, you just replace nvcc with /usr/local/cuda/nvcc or your installed path.

    4. Another way
    Another better way to do this will be using cmake for CUDA
    I haven’t tried this yet, but I heard it works.

  3. Curran Says:

    Thanks for this post! It helped me get Eclipse set up for CUDA in Ubuntu. I did a few things differently, here is my post about it in case anyone is interested:

  4. golf tips Says:

    This is definitely useful, You might be a pretty experienced digg. We have joined ones rss and appearance onward in order to looking for even more of the excellent publish. In addition, I’ve provided your website within my social networks

  5. Unknown Says:

    Synthetic products kill this natural recycling property from the soil, the texture changes with more
    and much more in the nutrients being washed away, explained Mr Unknown rates of interest in these types
    of large financial products may be fixed during
    the applying in addition to will vary depending for the federal perfect interest rates.

  6. south beach diet phase one recipes Says:

    Exceptional post however , I was wondering if you could write a litte more
    on this topic? I’d be very thankful if you could elaborate a little bit more.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: