473,811 Members | 3,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which compiler for a learner of C?

I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

Downloaded Bloodshed Dev-C++

Very nice but the default auto-indent woupd break my heart as I depend
on indentation. This is how a loop is formatted by default.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
int a = 0, b = 7;

for (a = 0; a <= b; ++a)
{
printf("Hello again\n");
}
system("PAUSE") ;
return 0;
}

That } that fails to align as it closes the "for" loop really puts me
off. If anyone knows how to fix this, this looks a fine compiler. Is
it good in the opinion of more experienced C programmers?

Is Visual C++ Express a good compiler?

Is there another for the Win32 platform that is recommended?

Sep 27 '06
46 2217
On Wed, 27 Sep 2006 23:00:49 +0000, Richard Heathfield
<in*****@invali d.invalidwrote in comp.lang.c:
jacob navia said:
pkirk25 wrote:
>
Is there another for the Win32 platform that is recommended?
Look lcc-win32 is a compiler system written for developing in C.

But he asked for one that is recommended.
Richard, are you ever going to get your head out of your ass, or has
picking on Jacob become your mission in life?

It is one thing, perhaps, to rebuke him when he answers a question by
pointing out a non-standard extension that his compiler has. But your
reply in this particular case smacks of nothing so much as personal
harassment or perhaps a vendetta of some sort.

Have you ever actually installed and used a version of lcc-win32? It
may be a bit hard to understand, but it is actually quite useful for
many things, and the non-standard extensions do not have to be used.

I have used his compiler, and Pelle's C, on occasion for algorithm
tests where I can write code cleanly and still receive enormous
performance improvements over Microsoft, Borland, and others, merely
because they support C99's inline functions.

Just what are your issues with Jacob and his compiler? I agree,
sometimes his posts stray off-topic, but the notion of adding language
extensions to a compiler is not something he initiated. Indeed, if it
were not for the fact that the C standard is in maintenance mode just
now, the best way to get extensions added to future standards is not
just to propose them, but to point to successful implementations . And
Jacob is doing just that.

Continuing to criticize lcc-win32 without producing examples of
incorrect code if produced, and continuing to criticize Jacob when, as
in this case, there was absolutely nothing off-topic about his reply,
is beginning to make you look like a pompous ass, or perhaps a troll.

How about giving it a rest?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Sep 28 '06 #11
pkirk25 wrote:
I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

Downloaded Bloodshed Dev-C++

Very nice but the default auto-indent woupd break my heart as I depend
on indentation. This is how a loop is formatted by default.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
int a = 0, b = 7;

for (a = 0; a <= b; ++a)
{
printf("Hello again\n");
}
system("PAUSE") ;
return 0;
}

That } that fails to align as it closes the "for" loop really puts me
off. If anyone knows how to fix this, this looks a fine compiler. Is
it good in the opinion of more experienced C programmers?

Is Visual C++ Express a good compiler?

Is there another for the Win32 platform that is recommended?
AMPC is a C compiler (not C++) that you can try. The trial version is
available for download at:
http://www.axiomsol.com/hedesu/fm/

Napi

Sep 28 '06 #12
Jack Klein said:
On Wed, 27 Sep 2006 23:00:49 +0000, Richard Heathfield
<in*****@invali d.invalidwrote in comp.lang.c:
>jacob navia said:
pkirk25 wrote:

Is there another for the Win32 platform that is recommended?

Look lcc-win32 is a compiler system written for developing in C.

But he asked for one that is recommended.

Richard, are you ever going to get your head out of your ass, or has
picking on Jacob become your mission in life?
Not at all. If it is suddenly unacceptable in this newsgroup to point out
errors and sloppy thinking, then I guess someone forgot to include me on
the email circular.
It is one thing, perhaps, to rebuke him when he answers a question by
pointing out a non-standard extension that his compiler has. But your
reply in this particular case smacks of nothing so much as personal
harassment or perhaps a vendetta of some sort.
No, I'm just pointing out that, as far as I'm aware, lcc-win32 is not
recommended by anyone except, it transpires, Mr Navia. Am I wrong? Do you,
for example, recommend lcc-win32?
Just what are your issues with Jacob and his compiler?
I have no issues with Mr Navia or with his compiler. I do, however, take
issue with some of the things Mr Navia says. His statements are often
incorrect and often stray off-topic in a continual bid to draw attention to
his product - which, in a technical newsgroup such as this, constitutes an
abuse. You know this already, I'm sure.

So - when he gets stuff wrong, what are we going to do? Ignore it, because
he maintains a compiler? I Don't Think So.

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 28 '06 #13

pkirk25 wrote:
I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

Downloaded Bloodshed Dev-C++

Very nice but the default auto-indent woupd break my heart as I depend
on indentation. This is how a loop is formatted by default.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
int a = 0, b = 7;

for (a = 0; a <= b; ++a)
{
printf("Hello again\n");
}
system("PAUSE") ;
return 0;
}

That } that fails to align as it closes the "for" loop really puts me
off. If anyone knows how to fix this, this looks a fine compiler. Is
it good in the opinion of more experienced C programmers?

Is Visual C++ Express a good compiler?

Is there another for the Win32 platform that is recommended?

VC++ is *NOT* recommended. Because it even does't know the common
sense! When I had to use it in a lab of my university, it even
highlighted the word 'new' and 'this' in my **C** code. And moreover,
it always gives fewer warnings, most of which are proved to be very
important, than gcc.
Dev-C++ is smaller, and I think, it is better than VC++. ;-p

Sep 28 '06 #14
On Thu, 28 Sep 2006 03:32:53 +0000, Richard Heathfield
<in*****@invali d.invalidwrote:
>Jack Klein said:
>On Wed, 27 Sep 2006 23:00:49 +0000, Richard Heathfield
<in*****@inval id.invalidwrote in comp.lang.c:
>>jacob navia said:

pkirk25 wrote:

Is there another for the Win32 platform that is recommended?

Look lcc-win32 is a compiler system written for developing in C.

But he asked for one that is recommended.

Richard, are you ever going to get your head out of your ass, or has
picking on Jacob become your mission in life?

Not at all. If it is suddenly unacceptable in this newsgroup to point out
errors and sloppy thinking, then I guess someone forgot to include me on
the email circular.
>It is one thing, perhaps, to rebuke him when he answers a question by
pointing out a non-standard extension that his compiler has. But your
reply in this particular case smacks of nothing so much as personal
harassment or perhaps a vendetta of some sort.

No, I'm just pointing out that, as far as I'm aware, lcc-win32 is not
recommended by anyone except, it transpires, Mr Navia. Am I wrong? Do you,
for example, recommend lcc-win32?
>Just what are your issues with Jacob and his compiler?

I have no issues with Mr Navia or with his compiler. I do, however, take
issue with some of the things Mr Navia says. His statements are often
incorrect and often stray off-topic in a continual bid to draw attention to
his product - which, in a technical newsgroup such as this, constitutes an
abuse. You know this already, I'm sure.

So - when he gets stuff wrong, what are we going to do? Ignore it, because
he maintains a compiler? I Don't Think So.
One of the questions that Jack asked that you did not answer is:

Have you ever actually installed and used a version of lcc-win32?

What's your answer?

--
jay

Sep 28 '06 #15
I've been playing with C in the evenings for a week now and any
problems I have will not be solved by moving to a newer compiler.

Thanks for the advice and for the chance to try out a few different
options.

Sep 28 '06 #16
pkirk25 wrote:
Jacob,

First off, let me say I respect waht you have already achieved.

As is often the case when people start with flowery openings, I'm
afraid I must say that your compiler is not for me.

For my first try, i just said no to usign a wizard for ny "hello world"
application.

The editor behaves like a DOS EDIT program. No syntax highlighting, no
folding, just a text file. vi with ctags is more user friendly.
Obvious. You named your file "main" and NOT "main.c". The editor
can't know which language you use.
>
Files are saved with the name you give them. My "hello world" failed
to compile because I didn't save the file as main.c as opposed to main.
Yes. Since 30 years (more or less) C programs are saved in files that
have the .c extension. If you want to innovate, sorry but the
editor doesn't know about it.
I then tried the wizard. It presented me with 62 lines of code!
Yes. So what?
Usual options like Ctrl-A for the Editor to Select All didn't work.

As I have no idea which of the 62 lines are essential to my "Hello
World" appliaction and which are not, I quit.
There is a routine to parse arguments, and a help message already
in the skeleton for a program. But if you can't read plain C...
well you have to learn it.

So far, so hard for a learner. Then I did get annoyed about the
documentation.

Documentation in pdf? Really, given that the web is over 15 years old,
there is no excuse for using pdf where html offers more ease of use.
The documentation is in CHM form. You access with the "Help" button in
the IDE. The PDF is a tutorial.
Microsoft with a building full of IDE experts on the Washington campus
edged you. I hope that isn't too hurtful.
No
Thanks for the link and work you have done.
You are welcome.
Sep 28 '06 #17
Richard Heathfield wrote:
pkirk25 said:
>>I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

It still does C just fine, though. It's a very good C compiler with a fine
IDE. In fact, on the rare occasions when I use Windows, it's my C compiler
of choice. (And I'm Mr Anti-Microsoft!)
Hmmm, that may be true for small to middle projects.
However, the fact that some of the standard headers lead to warnings,
that you cannot rely on the optimisation to produce the same programme
behaviour as unoptimised code, and that it cannot compile and link
projects of a certain size in Debug mode make it a beginners' tool in
my eyes.

As for the last two points: VS2005 looks much better in these respects.
I evaluated it only for a short time, though.
<OT>
For C++ code, I still got many warnings out of standard headers.
Fills one with confidence.
</OT>
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Sep 28 '06 #18
pkirk25 wrote:
I've been playing with C in the evenings for a week now and any
problems I have will not be solved by moving to a newer compiler.

Thanks for the advice and for the chance to try out a few different
options.
You seemed to look more for an IDE than another compiler.

One recommendation: Turn up the warning level and disable MS extensions.
If your programme does not do what you expect but the compiler issues
no diagnostics, try compiling with gcc on a reasonable warning level,
e.g.
gcc -std=c89 -pedantic -Wall -O myprog.c -c
(the -c will suppress linking).
You can do this either using mingw (which is what Bloodshed uses IIRC)
or via Cygwin (installing Cygwin just for gcc may a little bit much,
though).
Some problems will not be caught by the above; then you can use splint
or other lint programmes.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Sep 28 '06 #19
Cong Wang said:

<snip>
>
VC++ is *NOT* recommended.
I wouldn't hesitate to recommend it, certainly anything up to Version 6.
When they went .NET, MS screwed with it somewhat, and I'm not entirely sure
I like the changes they made (translation: I really, really *don't* like
those changes!) - but it's still a reasonable IDE over a reasonable
compiler.
Because it even does't know the common
sense! When I had to use it in a lab of my university, it even
highlighted the word 'new' and 'this' in my **C** code.
Yeah, I know. But despite a few glitches like that, it's a very good
product, and the compiler understands (or rather, correctly chooses not to
understand!) 'new' and 'this' just fine.
And moreover,
it always gives fewer warnings, most of which are proved to be very
important, than gcc.
Have you tried disabling Microsoft extensions and cranking up to warning
level 4? It's no lint, I agree, but it's reasonable nonetheless.
Dev-C++ is smaller, and I think, it is better than VC++. ;-p
Not having used Dev-C++ myself as far as I can remember, I must rely on what
I hear from people I respect who have used it. From such reports, I gather
that it is not sufficiently bad to warn people away from, nor sufficiently
good to rave about and sell your kids into slavery for. :-)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 28 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
2180
by: larry | last post by:
I was just looking at a demo training that mindleaders has on .net training: http://www.mindleaders.com/products/democourse3.asp And I don't believe this is correct or at least is misleading to me: "The search for an easy, productive, and very powerful programming language led to the birth of Visual C#. Visual C# incorporates the best features of Visual C++ and Visual Basic. Visual C# enables you to
0
273
by: Simon | last post by:
I've had enough of C# Learner. I've had enough of his complaining about using parentheses for every 'if' statement. I've had enough of his complaining about having to mix assignment of return value of methods with flow control, making writing code that's both readable and consistent, impossible. C# Learner is hindered by his complainging about C# being hindered by its predecessors and the Microsoft marketing department. If C# Learner...
0
10393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.