From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-user+bounces-119714-garchives=archives.gentoo.org@lists.gentoo.org>) id 1Pm9Ko-0004iK-Bo for garchives@archives.gentoo.org; Sun, 06 Feb 2011 18:27:43 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 42B5E1C02C for <garchives@archives.gentoo.org>; Sun, 6 Feb 2011 18:27:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0C23AE0907 for <gentoo-user@lists.gentoo.org>; Sun, 6 Feb 2011 18:19:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 9CD1E1B4028 for <gentoo-user@lists.gentoo.org>; Sun, 6 Feb 2011 18:19:24 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Score: -2.871 X-Spam-Level: X-Spam-Status: No, score=-2.871 required=5.5 tests=[AWL=-0.272, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QfC9QqHXjzwZ for <gentoo-user@lists.gentoo.org>; Sun, 6 Feb 2011 18:19:18 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 1E6451B4011 for <gentoo-user@gentoo.org>; Sun, 6 Feb 2011 18:19:17 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from <lnx-gentoo-user@m.gmane.org>) id 1Pm9CZ-0008AQ-62 for gentoo-user@gentoo.org; Sun, 06 Feb 2011 19:19:11 +0100 Received: from athedsl-378121.home.otenet.gr ([79.131.29.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <gentoo-user@gentoo.org>; Sun, 06 Feb 2011 19:19:11 +0100 Received: from realnc by athedsl-378121.home.otenet.gr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <gentoo-user@gentoo.org>; Sun, 06 Feb 2011 19:19:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras <realnc@arcor.de> Subject: [gentoo-user] Re: IDE recommendations for writing C? Date: Sun, 06 Feb 2011 20:19:18 +0200 Organization: Lucas Barks Message-ID: <iimomh$1c8$1@dough.gmane.org> References: <AANLkTi=4Wdd5QnGpR8qjPYmkDmswxRr5zVyjnQfBbC87@mail.gmail.com> <iimkjd$dj3$1@dough.gmane.org> <AANLkTinknh2fTHJ1QxkcNqHNw=Oub9iF8ORLJT5aDQv0@mail.gmail.com> Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: athedsl-378121.home.otenet.gr User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110126 Thunderbird/3.1.7 In-Reply-To: <AANLkTinknh2fTHJ1QxkcNqHNw=Oub9iF8ORLJT5aDQv0@mail.gmail.com> X-Archives-Salt: X-Archives-Hash: d697753fffd5b26a6ef161f3ce76574f On 02/06/2011 07:42 PM, Mark Knecht wrote: > On Sun, Feb 6, 2011 at 9:09 AM, Nikos Chantziaras<realnc@arcor.de> wrote: >> On 02/06/2011 12:08 AM, Mark Knecht wrote: >>> >>> Can someone recommend a good IDE to write C code in? >>> [...] >> >> I use Qt Creator. Though it's primarily for C++, I also use it for C. I >> recommend it because it's very easy to use. For version control, it >> supports Git, Subversion, Mercurial and Perforce. >> >> If you decide to use it and also make use of its own build system (qmake), >> post about it so I can tell you how to configure a project for plain C, >> because by default new projects are C++. > > I'll take a look at it. Do you recommend the testing 2.0 versions or stable 1.3? I use 2.1.0_rc1 since it came out. Turned out to be very stable. > At this time I have no need for GUI development. The app I want to do > right now could run on the command line. However getting started with > something that did support eventually doing a GUI would be nice as > long as it doesn't kill me. I use it both for GUI as well as for plain C CLI apps. > As for the C vs C++ issue, I only say C because the NVidia nvcc > compiler seems to be primarily a C compiler. It's not until you get to > Appendix D in the programming guide that they even mention C++ in the > context of CUDA. I started studying CUDA development recently too. While reading the examples that come with the SDK, I found out that they're all C++ though. The reason you can use C is that C is actually valid C++ (most of the time.) > That said, however, my understanding of what nvcc does is that what it > really does breaks apart the *.cu input files into portions that are > sent to the CUDA compiler, and portions that are sent to gcc. I > suspect the gcc/host computing side can be whatever is legal for gcc. > All I need, as best I understand it today, is to call nvcc instead of > gcc. nvcc compiles into C++. The end result is then compiled with g++ and linked with the CUDA libraries. This is normally done automatically by nvcc, unless you use the --cuda option. For example, to suppress that automation, you can compile a CUDA program with: nvcc --cuda myprogram.cu "myprogram.cu" can be something as simple as: int main() { return 0; } This will "compile" the program into "myprogram.cu.cpp". This can then be compiled manually with g++: g++ myprogram.cu.cpp -L/opt/cuda/lib64/ -lcudart It's just that nvcc does that automatically for you.