Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

learning C without an IDE

6 views
Skip to first unread message

Jason

unread,
Dec 1, 2008, 9:14:31 PM12/1/08
to
I'm trying to learn C and every time I go looking for a simple
compiler, I end up with a complicated IDE. I believe in IDEs but I
really just want to use a text editor and the command line (Windows).

Can someone point me to something simple like this?

Thank you.

user923005

unread,
Dec 1, 2008, 9:33:37 PM12/1/08
to

Notepad works for an editor on windows. You can use vi or whatever
you like on POSIX systems.
Just about every C compiler has a command line interface.
We do not know what compiler you are using (or want to use).
If you already have a compiler installed, then go to a newsgroup
dedicated to that compiler and ask how to use it from the command line
in that news group.

Jujitsu Lizard

unread,
Dec 1, 2008, 9:59:16 PM12/1/08
to
"Jason" <jason.li...@gmail.com> wrote in message
news:663189cb-fd9c-4f94...@i24g2000prf.googlegroups.com...

If you have an extra PC around, I'd just turn it into a Linux box (for
example, http://fedora.redhat.com). Then you can use "gcc".

I'm not sure if there is a pure port of gcc for Windows, but you can always
try cygwin (http://www.cygwin.com/).

You can use Emacs or vi.

There are a fair number of advantages to setting up a Linux box. You can,
for example, teach yourself Linux, Apache, PHP, Perl, Python, MySQL, and C++
as well. And Unix internals.

Furthermore, if you have a network in your home or apartment, you can quite
comfortably use a product like Putty along with Emacs or vi remotely from
Windows. In a typical home network, the network delay isn't even noticeable
(doesn't interfere with editing at all).

In fact, I have a box colocated in a data center about 100 miles from me,
and editing works fine. There _may_ have been some psychological adjustment
on my part to the fraction of a second delay, but I don't think so. It is
still "instant" and very usable.

The Lizard

darren

unread,
Dec 2, 2008, 12:17:57 AM12/2/08
to
On Dec 1, 6:59 pm, "Jujitsu Lizard" <jujitsu.liz...@gmail.com> wrote:
> "Jason" <jason.lillywh...@gmail.com> wrote in message

>
> news:663189cb-fd9c-4f94...@i24g2000prf.googlegroups.com...
>
> > I'm trying to learn C and every time I go looking for a simple
> > compiler, I end up with a complicated IDE. I believe in IDEs but I
> > really just want to use a text editor and the command line (Windows).
>
> > Can someone point me to something simple like this?
>
> If you have an extra PC around, I'd just turn it into a Linux box (for
> example,http://fedora.redhat.com).  Then you can use "gcc".

>
> I'm not sure if there is a pure port of gcc for Windows, but you can always
> try cygwin (http://www.cygwin.com/).
>
> You can use Emacs or vi.
>
> There are a fair number of advantages to setting up a Linux box.  You can,
> for example, teach yourself Linux, Apache, PHP, Perl, Python, MySQL, and C++
> as well.  And Unix internals.
>
> Furthermore, if you have a network in your home or apartment, you can quite
> comfortably use a product like Putty along with Emacs or vi remotely from
> Windows.  In a typical home network, the network delay isn't even noticeable
> (doesn't interfere with editing at all).
>
> In fact, I have a box colocated in a data center about 100 miles from me,
> and editing works fine.  There _may_ have been some psychological adjustment
> on my part to the fraction of a second delay, but I don't think so.  It is
> still "instant" and very usable.
>
> The Lizard

If you want to use Windows, if i remember correctly MinGW and Visual C+
+ from Microsoft are the two major free compilers. Once you have them
installed you can compile sourcecode from the command line. As already
mentioned, choose the compiler you wish to use, then read its
documentation to learn how to compile with it.

Jujitsu Lizard

unread,
Dec 2, 2008, 12:56:12 AM12/2/08
to
"darren" <mino...@gmail.com> wrote in message
news:357ca0c5-ed2a-4325...@s9g2000prm.googlegroups.com...

>
>If you want to use Windows, if i remember correctly MinGW and Visual C+
>+ from Microsoft are the two major free compilers. Once you have them
>installed you can compile sourcecode from the command line. As already
>mentioned, choose the compiler you wish to use, then read its
>documentation to learn how to compile with it.

Microsoft Visual C++ has been everything from $299 to $99 to free over the
years.

I'm too lazy to look up if the basic version is free these days.

But I forgot all about that.

And MinGW? Never heard of that in Lizardland.

The Lizard.

Ian Collins

unread,
Dec 2, 2008, 3:34:01 AM12/2/08
to
Jujitsu Lizard wrote:
> "Jason" <jason.li...@gmail.com> wrote in message
> news:663189cb-fd9c-4f94...@i24g2000prf.googlegroups.com...
>> I'm trying to learn C and every time I go looking for a simple
>> compiler, I end up with a complicated IDE. I believe in IDEs but I
>> really just want to use a text editor and the command line (Windows).
>>
>> Can someone point me to something simple like this?
>
> If you have an extra PC around, I'd just turn it into a Linux box (for
> example, http://fedora.redhat.com). Then you can use "gcc".
>
Or any of the free Unix variants.

> There are a fair number of advantages to setting up a Linux box. You
> can, for example, teach yourself Linux, Apache, PHP, Perl, Python,
> MySQL, and C++ as well. And Unix internals.
>

Linux internals :)

--
Ian Collins

santoshsy

unread,
Dec 2, 2008, 4:47:19 AM12/2/08
to

IDE - You can use GVIM for windows.
Get it from ftp://ftp.vim.org/pub/vim/pc/gvim72.exe

Compiler - You can use DJGPP (gcc compiler) for windows.
Get it from http://www.delorie.com/djgpp/zip-picker.html

-------------
~Santosh S Y

Nick Keighley

unread,
Dec 2, 2008, 4:47:56 AM12/2/08
to
On 2 Dec, 05:56, "Jujitsu Lizard" <jujitsu.liz...@gmail.com> wrote:
> "darren" <minof...@gmail.com> wrote in message

> news:357ca0c5-ed2a-4325...@s9g2000prm.googlegroups.com...
>
> >If you want to use Windows, if i remember correctly MinGW and Visual C+
> >+ from Microsoft are the two major free compilers. Once you have them
> >installed you can compile sourcecode from the command line. As already
> >mentioned, choose the compiler you wish to use, then read its
> >documentation to learn how to compile with it.
>
> Microsoft Visual C++ has been everything from $299 to $99 to free over the
> years.
>
> I'm too lazy to look up if the basic version is free these days.

Visual C++ Express is free. Despite the name it's a perfectly good
C++ and C compiler.

> But I forgot all about that.
>
> And MinGW?  Never heard of that in Lizardland.

I used to have trouble with the debugger.

"your code isn't compiled for debugging
would you like to recompile it for debugging now?"
<user clicks "yes">
"your code isn't compiled for debugging
would you like to recompile it for debugging now?"
<user clicks "yes">
...
sun goes out. last proton decays. C++ specification finalised.


--
Nick Keighley

When in doubt, consult a numerical analyst.

Lorenzo Villari

unread,
Dec 2, 2008, 6:48:12 AM12/2/08
to

"Jason" <jason.li...@gmail.com> ha scritto nel messaggio
news:663189cb-fd9c-4f94...@i24g2000prf.googlegroups.com...

Windows: Notepad + MSYS\MinGW
Linux: KWrite (if you have KDE of course) + the toolchain on the
system

That's all.


Nick Keighley

unread,
Dec 2, 2008, 6:58:18 AM12/2/08
to
On 2 Dec, 11:48, "Lorenzo Villari" <vll...@alice.it> wrote:
> "Jason" <jason.lillywh...@gmail.com> ha scritto nel messaggionews:663189cb-fd9c-4f94...@i24g2000prf.googlegroups.com...

>
> > I'm trying to learn C and every time I go looking for a simple
> > compiler, I end up with a complicated IDE. I believe in IDEs but I
> > really just want to use a text editor and the command line (Windows).
>
> > Can someone point me to something simple like this?
>
> > Thank you.
>
> Windows: Notepad + MSYS\MinGW

there are other program editors around for windows
eg. ConTEXT, Crimson. Even Word is a better editor
than Notepad...

Bartc

unread,
Dec 2, 2008, 7:15:01 AM12/2/08
to

"Jason" <jason.li...@gmail.com> wrote in message
news:663189cb-fd9c-4f94...@i24g2000prf.googlegroups.com...

For Windows, I've used the following C compilers from the command line:

Mingw (gcc.exe)
Digital Mars (dmc.exe)
Lcc-win32 (lcc.exe)
Pelles C (pocc.exe)

The last two come with an IDE that you can safely ignore.

--
Bartc

Tetsuya

unread,
Dec 2, 2008, 7:33:26 AM12/2/08
to

notepad++ or code::blocks.
gcc is THE compiler :-)

--
Amarok 1.4.10 is airing: Metallica - Damage, Inc. [from: "Master Of
Puppets"]

Lorenzo Villari

unread,
Dec 2, 2008, 7:34:20 AM12/2/08
to

"Nick Keighley" <nick_keigh...@hotmail.com> ha scritto nel messaggio
news:386cab8d-2ad7-495b...@w35g2000yqm.googlegroups.com...

>
> there are other program editors around for windows
> eg. ConTEXT, Crimson. Even Word is a better editor
> than Notepad...

I've written Notepad because that's already on the system when you istall
the OS, just like KWrite if you happen to install a Linux distribution who
uses KDE. Of course there are better ones...


Mara Guida

unread,
Dec 2, 2008, 9:25:52 AM12/2/08
to

I use gcc from "Equation Solution"
( http://www.equation.com/ )
with no need for Cygwin or MinGW or anything

... and I use one of many Notepad replacements
for the text editor :)

Message has been deleted

Flash Gordon

unread,
Dec 2, 2008, 11:18:16 AM12/2/08
to
Jujitsu Lizard wrote, On 02/12/08 05:56:

> "darren" <mino...@gmail.com> wrote in message
> news:357ca0c5-ed2a-4325...@s9g2000prm.googlegroups.com...
>>
>> If you want to use Windows, if i remember correctly MinGW and Visual C+
>> + from Microsoft are the two major free compilers. Once you have them
>> installed you can compile sourcecode from the command line. As already
>> mentioned, choose the compiler you wish to use, then read its
>> documentation to learn how to compile with it.
>
> Microsoft Visual C++ has been everything from $299 to $99 to free over
> the years.
>
> I'm too lazy to look up if the basic version is free these days.

I'll save you the trouble. There is a version available free (IIRC you
cannot use it for commercial purposes) and has been for at least a few
versions and a number of years. The only reason I don't have the free
version is because I have an MSDN subscription on the company...

> But I forgot all about that.
>
> And MinGW? Never heard of that in Lizardland.

gcc (and other nix type tools) for Windows. It is (I think) short for
Minimalistic GNU for Windows. However, because it uses the Microsoft C
library and gcc has not been properly adapted for it there *are* areas
where it does not even conform to the old C90 standard. I believe (from
memory) that the printf/scanf families have problems with long double.
This is not an error by either Microsoft or the gcc team, rather it is a
problem in the way the MinGW team have glued the two things together.
--
Flash Gordon
If spamming me sent it to sm...@spam.causeway.com
If emailing me use my reply-to address
See the comp.lang.c Wiki hosted by me at http://clc-wiki.net/

J. J. Farrell

unread,
Dec 2, 2008, 1:29:45 PM12/2/08
to

I've never heard of a compiler with an IDE which doesn't also have a
fully functional command line interface. I don't use IDEs, and I've
never come across a compiler on any platform which requires me to. I
suggest looking at the documentation for the compilers you've tried;
Microsoft's compilers certainly have fully functional and documented CLIs.

For a text editor, I use Vim on all platforms.

Peter Nilsson

unread,
Dec 2, 2008, 4:17:19 PM12/2/08
to
Jason <jason.lillywh...@gmail.com> wrote:
> I'm trying to learn C and every time I go looking for
> a simple compiler, I end up with a complicated IDE.

So don't use the IDE.

> I believe in IDEs but I really just want to use a text
> editor and the command line (Windows).

So use a text editor and DOS window.

> Can someone point me to something simple like this?

http://www.google.com.au/search?q=c+compiler
--> http://www.thefreecountry.com/compilers/cpp.shtml
--> http://www.delorie.com/djgpp/

--
Peter

CBFalconer

unread,
Dec 2, 2008, 5:34:55 PM12/2/08
to

Try the DJGPP system, which includes a copy of gcc. I also
recommend getting the textpad editor. You can find these things
for free download at:

<http://delorie.com/djgpp/>
<http://textpad.com>

Then tell winders to bring up a console panel on bootup, and have
fun.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

Antoninus Twink

unread,
Dec 2, 2008, 5:38:52 PM12/2/08
to
On 2 Dec 2008 at 22:34, CBFalconer wrote:
> Try the DJGPP system, which includes a copy of gcc. I also recommend
> getting the textpad editor.

Oh yes, marvelous advice! Make sure you dress in a loincloth and woad
paint while you code to complete the stone-age experience.

robert...@yahoo.com

unread,
Dec 2, 2008, 6:45:57 PM12/2/08
to
On Dec 2, 10:18 am, Flash Gordon <s...@spam.causeway.com> wrote:
> I'll save you the trouble. There is a version available free (IIRC you
> cannot use it for commercial purposes) and has been for at least a few
> versions and a number of years. The only reason I don't have the free
> version is because I have an MSDN subscription on the company...


Actually:

"#7: Can I use Express Editions for commercial use?
Yes, there are no licensing restrictions for applications built using
Visual Studio Express Editions."

http://www.microsoft.com/express/support/faq/

user1

unread,
Dec 2, 2008, 7:52:40 PM12/2/08
to

That equation.com version of gcc really is a MinGW based compiler, nicely packaged.

C:\temp>gcc -v
Built by Equation Solution (http://www.Equation.com).
Using built-in specs.
Target: i386-pc-mingw32
Configured with: ../gcc-4.3.2-mingw/configure --host=i386-pc-mingw32
--build=x86_64-unknown-linux-gnu --target=i386-pc-mingw32
--prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.3.2
--with-gcc --with-gnu-ld --with-gnu-as --disable-shared --disable-nls
--disable-tls
--with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gmp
--with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr
--enable-languages=c,c++,fortran
--with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.3.2
--enable-libgomp --enable-threads=win32 --disable-win32-registry
Thread model: win32
gcc version 4.3.2 (GCC)

litchie

unread,
Dec 2, 2008, 8:59:31 PM12/2/08
to

MinGW(gcc gdb gcov for windows) is perfect. The compiled binary
doesn't require a redistributable package to run on other machines,
while VC++ does.

If you want to write c programs in the way similar to the way fathers
of C work, you can give VIM a try. www.vim.org . Don't use the GUI,
start vim in the command prompt window.

Peter Nilsson

unread,
Dec 2, 2008, 11:55:45 PM12/2/08
to
"J. J. Farrell" <j...@bcs.org.uk> wrote:
> I've never heard of a compiler with an IDE which doesn't
> also have a fully functional command line interface.

The old Mac OSes had no 'command line' interface whatsoever.
Unless you used Apple's own Macintosh Programmer's Workshop,
you pretty much had no choice but to use an IDE.
[Implementations supplied their own console emulators for
console apps.]

--
Peter

nick_keigh...@hotmail.com

unread,
Dec 3, 2008, 3:03:43 AM12/3/08
to
On 2 Dec, 18:29, "J. J. Farrell" <j...@bcs.org.uk> wrote:

> I've never heard of a compiler with an IDE which doesn't also have a
> fully functional command line interface. I don't use IDEs, and I've
> never come across a compiler on any platform which requires me to.

I've used older Macintosh stuff that had no command line interface.
But them the old Mac didn't *have* a command line.

--
Nick Keighley

Flash Gordon

unread,
Dec 3, 2008, 9:35:21 AM12/3/08
to
robert...@yahoo.com wrote, On 02/12/08 23:45:

I'm sure it never used to be allowed. However, I have other reasons to
have an MSDN sub.

0 new messages