* [gentoo-user] IDE recommendations for writing C?
@ 2011-02-05 22:08 Mark Knecht
2011-02-05 22:39 ` Alex Schuster
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Mark Knecht @ 2011-02-05 22:08 UTC (permalink / raw
To: gentoo-user
Can someone recommend a good IDE to write C code in?
1) Something that can display multiple files in a project.
2) Something that have some sort of version control built into it?
3) If possible, I can compile right in the IDE.
I've starting writing something. It's hundreds of lines long in 1 file
and I just messed up a brace somewhere which I haven't been able to
figure out in vi.
Thanks,
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] IDE recommendations for writing C?
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
@ 2011-02-05 22:39 ` Alex Schuster
2011-02-06 0:12 ` Mark Knecht
2011-02-05 23:13 ` [gentoo-user] " Jacob Todd
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Alex Schuster @ 2011-02-05 22:39 UTC (permalink / raw
To: gentoo-user
Mark Knecht writes:
> Can someone recommend a good IDE to write C code in?
>
> 1) Something that can display multiple files in a project.
>
> 2) Something that have some sort of version control built into it?
>
> 3) If possible, I can compile right in the IDE.
Emacs. If you dare to go this way. The learning curve is high, but once
you know how to use it, you probably will be glad.
Eclipse is pretty cool, and I've heard good things about Kdevelop.
> I've starting writing something. It's hundreds of lines long in 1 file
> and I just messed up a brace somewhere which I haven't been able to
> figure out in vi.
Just use the % key.
Wonko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] IDE recommendations for writing C?
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
2011-02-05 22:39 ` Alex Schuster
@ 2011-02-05 23:13 ` Jacob Todd
2011-02-06 10:57 ` Florian Philipp
` (3 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Jacob Todd @ 2011-02-05 23:13 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
Acme from plan9port.
On Feb 5, 2011 5:11 PM, "Mark Knecht" <markknecht@gmail.com> wrote:
> Can someone recommend a good IDE to write C code in?
>
> 1) Something that can display multiple files in a project.
>
> 2) Something that have some sort of version control built into it?
>
> 3) If possible, I can compile right in the IDE.
>
> I've starting writing something. It's hundreds of lines long in 1 file
> and I just messed up a brace somewhere which I haven't been able to
> figure out in vi.
>
> Thanks,
> Mark
>
[-- Attachment #2: Type: text/html, Size: 746 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] IDE recommendations for writing C?
2011-02-05 22:39 ` Alex Schuster
@ 2011-02-06 0:12 ` Mark Knecht
2011-02-06 17:17 ` [gentoo-user] " Grant Edwards
0 siblings, 1 reply; 14+ messages in thread
From: Mark Knecht @ 2011-02-06 0:12 UTC (permalink / raw
To: gentoo-user
On Sat, Feb 5, 2011 at 2:39 PM, Alex Schuster <wonko@wonkology.org> wrote:
> Mark Knecht writes:
>
>> Can someone recommend a good IDE to write C code in?
>>
>> 1) Something that can display multiple files in a project.
>>
>> 2) Something that have some sort of version control built into it?
>>
>> 3) If possible, I can compile right in the IDE.
>
> Emacs. If you dare to go this way. The learning curve is high, but once
> you know how to use it, you probably will be glad.
> Eclipse is pretty cool, and I've heard good things about Kdevelop.
>
>> I've starting writing something. It's hundreds of lines long in 1 file
>> and I just messed up a brace somewhere which I haven't been able to
>> figure out in vi.
>
> Just use the % key.
>
> Wonko
I specifically _don't_ want a high learning curve. I want this to
remain fun, if possible.
After an hour and a half of llooking for the problem in vi KDevelop
with it's color editor helped me find the problem in a few minutes.
That's a big help.
I haven't figured out how to tell Kdevelop to use a different compiler
but that's not important right now. I can build in a terminal until I
learn how.
Thanks for the ideas.
I also loaded up codeblocks which I read good things about. CodeLite
is supposed to be good but I couldn't get it unmasked.
Netbeans wanted to install too much Java stuff. Understandable as it's
written in Java but I decided not to look at that one right now.
For now I'm set. Thanks!
Cheers,
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] IDE recommendations for writing C?
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
2011-02-05 22:39 ` Alex Schuster
2011-02-05 23:13 ` [gentoo-user] " Jacob Todd
@ 2011-02-06 10:57 ` Florian Philipp
2011-02-06 15:29 ` Vortex 3
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Florian Philipp @ 2011-02-06 10:57 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]
Am 05.02.2011 23:08, schrieb Mark Knecht:
> Can someone recommend a good IDE to write C code in?
>
Eclipse CDT. It is not as good as Eclipse JDT for Java but it is still
pretty good and gets you started really quick.
> 1) Something that can display multiple files in a project.
>
Multiple tabs and multiple windows. You can also place two tabs next to
each other for comparison by drag-and-drop.
> 2) Something that have some sort of version control built into it?
>
I believe there is something called a "local history" but I don't rely
on it. There are good plugins for SVN (Subclipse, Subversive), Mercurial
and Git (EGit). I've only worked with Subclipse, though.
> 3) If possible, I can compile right in the IDE.
>
It comes with a GUI make file generator. It is not great for
distribution and such alike but it is good enough to compile code while
developing. You can also configure it to use existing make files or do
other things when you press "build" or "run".
> I've starting writing something. It's hundreds of lines long in 1 file
> and I just messed up a brace somewhere which I haven't been able to
> figure out in vi.
>
If the syntax check doesn't help you and the error markers after
executing GCC don't help either, just mark everything and tell Eclipse
to correct the indentation (Ctrl+A Ctrl+I). Usually you can then see
where it messes up.
BTW: If you try it out, please just download it from eclipse.org. Don't
use the version from portage. It is a bit outdated, takes ages to build
and I also had problems with it in the past.
Hope this helps,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] IDE recommendations for writing C?
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
` (2 preceding siblings ...)
2011-02-06 10:57 ` Florian Philipp
@ 2011-02-06 15:29 ` Vortex 3
2011-02-06 17:09 ` [gentoo-user] " Nikos Chantziaras
2011-02-06 19:46 ` [gentoo-user] " Helmut Jarausch
5 siblings, 0 replies; 14+ messages in thread
From: Vortex 3 @ 2011-02-06 15:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 599 bytes --]
2011/2/5 Mark Knecht <markknecht@gmail.com>
> Can someone recommend a good IDE to write C code in?
>
> 1) Something that can display multiple files in a project.
>
> 2) Something that have some sort of version control built into it?
>
> 3) If possible, I can compile right in the IDE.
>
> I've starting writing something. It's hundreds of lines long in 1 file
> and I just messed up a brace somewhere which I haven't been able to
> figure out in vi.
>
> Thanks,
> Mark
>
>
An option could be the Bluefish editor, if you like it. Take a look here:
http://bluefish.openoffice.nl/index.html
Cheers!
[-- Attachment #2: Type: text/html, Size: 1013 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-user] Re: IDE recommendations for writing C?
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
` (3 preceding siblings ...)
2011-02-06 15:29 ` Vortex 3
@ 2011-02-06 17:09 ` Nikos Chantziaras
2011-02-06 17:42 ` Mark Knecht
2011-02-06 19:46 ` [gentoo-user] " Helmut Jarausch
5 siblings, 1 reply; 14+ messages in thread
From: Nikos Chantziaras @ 2011-02-06 17:09 UTC (permalink / raw
To: gentoo-user
On 02/06/2011 12:08 AM, Mark Knecht wrote:
> Can someone recommend a good IDE to write C code in?
>
> 1) Something that can display multiple files in a project.
>
> 2) Something that have some sort of version control built into it?
>
> 3) If possible, I can compile right in the IDE.
>
> I've starting writing something. It's hundreds of lines long in 1 file
> and I just messed up a brace somewhere which I haven't been able to
> figure out in vi.
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++.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-user] Re: IDE recommendations for writing C?
2011-02-06 0:12 ` Mark Knecht
@ 2011-02-06 17:17 ` Grant Edwards
0 siblings, 0 replies; 14+ messages in thread
From: Grant Edwards @ 2011-02-06 17:17 UTC (permalink / raw
To: gentoo-user
On 2011-02-06, Mark Knecht <markknecht@gmail.com> wrote:
> On Sat, Feb 5, 2011 at 2:39 PM, Alex Schuster <wonko@wonkology.org> wrote:
>> Mark Knecht writes:
>>
>>> Can someone recommend a good IDE to write C code in?
>>>
>>> 1) Something that can display multiple files in a project.
>>>
>>> 2) Something that have some sort of version control built into it?
>>>
>>> 3) If possible, I can compile right in the IDE.
>>
>> Emacs. If you dare to go this way. The learning curve is high, but
>> once you know how to use it, you probably will be glad. Eclipse is
>> pretty cool, and I've heard good things about Kdevelop.
>>
>>> I've starting writing something. It's hundreds of lines long in 1
>>> file and I just messed up a brace somewhere which I haven't been able
>>> to figure out in vi.
>>
>> Just use the % key.
>
> I specifically _don't_ want a high learning curve. I want this to
> remain fun, if possible.
Ah. Then you picked the wrong language, you should be using Python.
(I'm only half joking.)
I use emacs as well. I tried eclipse, but found it huge, slow,
clunky, and I ran into compatibility problems between versions. I
went back to emacs.
I also tried visual slick edit, and it's pretty nice, but it didn't
seem worth the hassle of dealing with the licensing.
The Scite editor is pretty decent (I really like the folding feature),
but I haven't used it much.
--
Grant
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Re: IDE recommendations for writing C?
2011-02-06 17:09 ` [gentoo-user] " Nikos Chantziaras
@ 2011-02-06 17:42 ` Mark Knecht
2011-02-06 17:59 ` Mark Knecht
2011-02-06 18:19 ` Nikos Chantziaras
0 siblings, 2 replies; 14+ messages in thread
From: Mark Knecht @ 2011-02-06 17:42 UTC (permalink / raw
To: gentoo-user
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?
>>
>> 1) Something that can display multiple files in a project.
>>
>> 2) Something that have some sort of version control built into it?
>>
>> 3) If possible, I can compile right in the IDE.
>>
>> I've starting writing something. It's hundreds of lines long in 1 file
>> and I just messed up a brace somewhere which I haven't been able to
>> figure out in vi.
>
> 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?
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.
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.
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.
If I can find a simple C++ Hello World program that actually uses
classes or whatever makes C++ C++ then I'll see how it works. It's
pretty easy to drop in a few CUDA commands and see if i works.
Thanks for the info. Looks interesting.
Cheers,
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Re: IDE recommendations for writing C?
2011-02-06 17:42 ` Mark Knecht
@ 2011-02-06 17:59 ` Mark Knecht
2011-02-06 18:33 ` Nikos Chantziaras
2011-02-06 18:19 ` Nikos Chantziaras
1 sibling, 1 reply; 14+ messages in thread
From: Mark Knecht @ 2011-02-06 17:59 UTC (permalink / raw
To: gentoo-user
On Sun, Feb 6, 2011 at 9:42 AM, Mark Knecht <markknecht@gmail.com> wrote:
<SNIP>
> I'll take a look at it. Do you recommend the testing 2.0 versions or stable 1.3?
<SNIP>
Never mind on the 2.0 item. I run stable and that would require about
15 qt packages to be unmasked. Not interested in going there right now
- maybe later.
Cheers,
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-user] Re: IDE recommendations for writing C?
2011-02-06 17:42 ` Mark Knecht
2011-02-06 17:59 ` Mark Knecht
@ 2011-02-06 18:19 ` Nikos Chantziaras
2011-02-06 19:49 ` Mark Knecht
1 sibling, 1 reply; 14+ messages in thread
From: Nikos Chantziaras @ 2011-02-06 18:19 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-user] Re: IDE recommendations for writing C?
2011-02-06 17:59 ` Mark Knecht
@ 2011-02-06 18:33 ` Nikos Chantziaras
0 siblings, 0 replies; 14+ messages in thread
From: Nikos Chantziaras @ 2011-02-06 18:33 UTC (permalink / raw
To: gentoo-user
On 02/06/2011 07:59 PM, Mark Knecht wrote:
> On Sun, Feb 6, 2011 at 9:42 AM, Mark Knecht<markknecht@gmail.com> wrote:
> <SNIP>
>> I'll take a look at it. Do you recommend the testing 2.0 versions or stable 1.3?
> <SNIP>
>
> Never mind on the 2.0 item. I run stable and that would require about
> 15 qt packages to be unmasked. Not interested in going there right now
> - maybe later.
You can also download it as a Linux installer:
http://qt.nokia.com/developer/qt-qtcreator-prerelease
I did this before it was put into portage. I simply installed it as a
normal user into my own home directory to make sure it won't mess with
system configuration.
But on the other hand, the 1.3 version is fine too and does the job just
as well.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] IDE recommendations for writing C?
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
` (4 preceding siblings ...)
2011-02-06 17:09 ` [gentoo-user] " Nikos Chantziaras
@ 2011-02-06 19:46 ` Helmut Jarausch
5 siblings, 0 replies; 14+ messages in thread
From: Helmut Jarausch @ 2011-02-06 19:46 UTC (permalink / raw
To: gentoo-user
On 02/05/2011 11:08:34 PM, Mark Knecht wrote:
> Can someone recommend a good IDE to write C code in?
>
> 1) Something that can display multiple files in a project.
>
> 2) Something that have some sort of version control built into it?
>
> 3) If possible, I can compile right in the IDE.
>
> I've starting writing something. It's hundreds of lines long in 1
> file
> and I just messed up a brace somewhere which I haven't been able to
> figure out in vi.
>
Let me suggest another alternative.
I am enthusiastic about CodeLite, see
www.codelite.org
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Re: IDE recommendations for writing C?
2011-02-06 18:19 ` Nikos Chantziaras
@ 2011-02-06 19:49 ` Mark Knecht
0 siblings, 0 replies; 14+ messages in thread
From: Mark Knecht @ 2011-02-06 19:49 UTC (permalink / raw
To: gentoo-user
On Sun, Feb 6, 2011 at 10:19 AM, Nikos Chantziaras <realnc@arcor.de> wrote:
<SNIP>
>
>> 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.)
>
OK, I suspect I'm being limited by an include file which was supplied
with the exercises for the book CUDA By Design. Nice little book, easy
& fun to read, good discussion of the basics for an entry level
programmer like me. Works fine if the file compiled is main.cu, but
fails if I rename that file main.cpp.
If I can figure out what is non-C++ in those files then I'll try to
focus on being C+ compatible because it seems all these IDE tools
expect that anyway.
I glazed over looking at the SDK examples myself because they are
frankly far beyond my programming skills without some text to
understand what they are trying to accomplish.
CUDA programming itself hasn't been all that hard. I'm luck that I
have a problem to solve that I think fits it pretty well.
>
>> 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.
>
Really good info, thanks!
As for qt-creator, I tried the binary installer but after installing
it didn't run complaining that it cannot be mixed with the Qt
libraries that are on my system. I'll stick with the 1.3 version for
now and wait for portage to catch up.
Cheers,
Mark
P.S. - If you (or anyone else) wants to talk about CUDA, contact me
off list. I'm always interested and available. - MWK
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-02-06 20:08 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-05 22:08 [gentoo-user] IDE recommendations for writing C? Mark Knecht
2011-02-05 22:39 ` Alex Schuster
2011-02-06 0:12 ` Mark Knecht
2011-02-06 17:17 ` [gentoo-user] " Grant Edwards
2011-02-05 23:13 ` [gentoo-user] " Jacob Todd
2011-02-06 10:57 ` Florian Philipp
2011-02-06 15:29 ` Vortex 3
2011-02-06 17:09 ` [gentoo-user] " Nikos Chantziaras
2011-02-06 17:42 ` Mark Knecht
2011-02-06 17:59 ` Mark Knecht
2011-02-06 18:33 ` Nikos Chantziaras
2011-02-06 18:19 ` Nikos Chantziaras
2011-02-06 19:49 ` Mark Knecht
2011-02-06 19:46 ` [gentoo-user] " Helmut Jarausch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox