LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-19-2010, 10:29 AM   #1
naaman
Member
 
Registered: Jun 2006
Posts: 84

Rep: Reputation: 16
Makefile for CUDA/C++ code


Hi,

I'd like to write a Makefile for my CUDA/C++ code but I didn't know
how things work with CUDA, I mean there is a nvcc compiler but I don't know what I've got to do with this.
Do I have to firstly run nvcc and then g++ or only nvcc to compile my CUDA/C++ code ? I found nothing on the web explaining such basic things ....

Can you help me ?

thanks,
 
Old 06-19-2010, 11:00 AM   #2
naaman
Member
 
Registered: Jun 2006
Posts: 84

Original Poster
Rep: Reputation: 16
I understood how it works by myself ...
Firstly you have to give the compiler path so that nvcc find it (but by default it goes in /usr/bin/ to look for it, I think)
And you have to specify what programing language nvcc will deal with. By default nvcc use a C++ compiler.

So the both command are the same for most UNIX platforms :
Code:
nvcc -o mycodebin ./mycodesource.cpp
nvcc --compiler-bindir=/usr/bin --host-compilation 'C++' -o mycodebin ./mycodesoure.cpp
And you can give some options to the C/C++ compiler by using --compiler-options I guess

Last edited by naaman; 06-19-2010 at 11:02 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unsuccessful debug using Makefile during integration of cpp code to c code eryn Programming 4 05-13-2010 09:36 PM
CUDA on 11.2 (64 bit) marios_auth SUSE / openSUSE 1 04-02-2010 10:46 PM
How to Start a QT+CUDA+C/C++ Project? eddiep Linux - Software 4 02-18-2010 02:10 PM
Anyone tried nvidia CUDA toolkit sniff Programming 0 02-28-2007 05:40 AM
Compiling old code: Makefile plus config.in cbcallaw Linux - Software 1 04-29-2004 05:35 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration