Free C\C++ compiler

J

jacob navia

Ron said:
No...the IDE is something you'll have to pay for.

Well, even if you pay for it, you will not have a real
time spelling checker.

The IDE of lcc-win32 features a real time spelling
checker. The language is C, not C++, so the compiler
can have the luxury of recompiling your source, and
in a few seconds after you have mistyped something
underline the word in red.

Microsoft Word does that, and it is strange that
MSVC 7 doesn't do it.

Of course the IDE of lcc-win32 is not comparable with
the advanced Microsoft software.

Installation time is a few seconds (45-50 in slow
machines), not comparable with the 2.3GB software of
VC7. The whole compressed file (without help files)
is only 4MB in lcc-win32.

Simplicity pays.

If you want to have a simple compiler that doesn't do
anything else but compile C code you use lcc-win32.

For all else, MSVC7 is quite a good choice. It supports
multi-language environments, and all the immense
quantity of software that Microsoft has produced in
the last years.

But it is not very good at pure C compiling. It is very
complex, and not so easy to use for C. Besides a 2.3GB
DVD is not so quick to install in several machines in a network.

There are smaller versions of MSVC though, and lcc-win32 is
the work of a few people only.
 
R

Ron Natalie

jacob said:
Well, even if you pay for it, you will not have a real
time spelling checker.
A spell checker is pretty useless for a compiler.

A syntax/semantics checker is more useful. I use Whole Tomato's
Visual Assist to do that inside the Visual Studio IDE. Not only
does it replace the crappy Microsoft intellisense but it underlines
things like undefined identifiers, etc.... saves you a trip through
watching the compiles blow up because you mistyped something.
 
J

jacob navia

Ron said:
A spell checker is pretty useless for a compiler.

You misunderstand. It is spelling checker for undefined (mistyped)
symbols. Whole Tomato has this feature too.
A syntax/semantics checker is more useful. I use Whole Tomato's
Visual Assist to do that inside the Visual Studio IDE. Not only
does it replace the crappy Microsoft intellisense but it underlines
things like undefined identifiers, etc.... saves you a trip through
watching the compiles blow up because you mistyped something.

Interesting software this whole tomato...

Feature matrix:

Feature Whole tomato lcc-win32 IDE
Enhanced listboxes yes yes
Better parameter info yes yes
Hovering tooltips yes only in debugger
Suggestion lists yes yes
Autotext yes no (macros?)
Code templates yes no
Insert _ after m+shift yes not needed in C
Repair case yes no
Convert -> to . yes no
Show current scope yes yes
Context field yes no
Bypass lists after F1 yes no
Enhanced syntax coloring yes no
Local variables in bold yes no
Global functions in italic yes no
Highlight matching {}() yes yes
Column indicator yes no
Print in color yes no
Find by Context yes no
Find symbol in Workspace yes yes
Goto definition yes yes
List methods in file yes yes (lists functions)
Open file in workspace yes yes
Most recently used list yes yes
Move scope yes yes
Navigate like in browser yes yes
Underline mistyped symbols yes yes
Search for a function in WS no yes
Object file cross reference no yes
Display functions by size no yes
Executable statistics no yes
Software metrics no yes
Display include tree no yes
Slice text by local variable no yes
Function tree no yes
Show #ifdefed code in gray no yes

All in all lcc-win32 fares not very bad...

The whole tomato page is a treasure of good ideas.
For instance the code templates is a really good idea,
so I will implement that as soon as I have
some time. Other things that look interesting are the automatic
correction of -> to . and the other way around.

Other things are of questionable utility. True, you can write each
word in a different color, but this rainbow approach is more
distracting than useful. I strive to have a balance between features
that really help, and features that are a nuisance...
Printing in color? Well..., maybe.
 
J

jacob navia

Ron said:
> jacob navia wrote:
>
> A spell checker is pretty useless for a compiler.


You misunderstand. It is spelling checker for undefined (mistyped)
symbols. Whole Tomato has this feature too.
>
> A syntax/semantics checker is more useful. I use Whole Tomato's
> Visual Assist to do that inside the Visual Studio IDE. Not only
> does it replace the crappy Microsoft intellisense but it underlines
things like undefined identifiers, etc.... saves you a trip through
watching the compiles blow up because you mistyped something.


Interesting software this whole tomato...

Feature matrix:

Feature Whole tomato lcc-win32 IDE
Enhanced listboxes yes yes
Better parameter info yes yes
Hovering tooltips yes only in debugger
Suggestion lists yes yes
Autotext yes no (macros?)
Code templates yes no
Insert _ after m+shift yes not needed in C
Repair case yes no
Convert -> to . yes no
Show current scope yes yes
Context field yes no
Bypass lists after F1 yes no
Enhanced syntax coloring yes no
Local variables in bold yes no
Global functions in italic yes no
Highlight matching {}() yes yes
Column indicator yes no
Print in color yes no
Find by Context yes no
Find symbol in Workspace yes yes
Goto definition yes yes
List methods in file yes yes (lists functions)
Open file in workspace yes yes
Most recently used list yes yes
Move scope yes yes
Navigate like in browser yes yes
Underline mistyped symbols yes yes
Search for a function in WS no yes
Object file cross reference no yes
Display functions by size no yes
Executable statistics no yes
Software metrics no yes
Display include tree no yes
Slice text by local variable no yes
Function tree no yes
Show #ifdefed code in gray no yes

All in all lcc-win32 fares not very bad...

The whole tomato page is a treasure of good ideas.
For instance the code templates is a really good idea,
so I will implement that as soon as I have
some time. Other things that look interesting are the automatic
correction of -> to . and the other way around.

Other things are of questionable utility. True, you can write each
word in a different color, but this rainbow approach is more
distracting than useful. I strive to have a balance between features
that really help, and features that are a nuisance...
Printing in color? Well..., maybe.
 
J

Jerry Coffin

[ ... ]
Search for a function in WS no yes
Object file cross reference no yes
Display functions by size no yes
Executable statistics no yes
Software metrics no yes
Display include tree no yes
Slice text by local variable no yes
Function tree no yes
Show #ifdefed code in gray no yes

Some of these, while perhaps technically true, are misleading to put
it mildly.

Since Visual Assist is an addon to the VC++ IDE, it's silly for it to
include things that already work perfectly fine in the VC++ IDE, such
as generating a function tree.

Likewise, finding a function in a workspace is (more or less) built
into VC++ itself -- its workspace view shows a tree of functions,
classes, etc., in alphabetical order. Given that lcc-win32 only does C
(if I'm not mistaken), it seems reasonable to compare them on a C-only
basis. In this case, all functions are in the "globals" section, so
you basically just double click on the function name in the list to go
to it. I suppose this isn't technically "searching for" it, but merely
finding it, but IMO, that's (if anything) an advantage rather than a
weakness.

Some of these "features" also strike me as close to useless -- just
for example, the "executable statistics". Most of the time this sort
of information is simply superfluous, but when you do need it, you
need a LOT more detail. At the current level, it strikes me as kind of
nice and kind of interesting, but unlikely to be of real use on a
regular basis.

Some of the features also seem quite unstable -- at least for me,
attempting to get the #include tree causes the IDE to crash.

IMO, of these, only the last (the IDE crashing) is really a problem
with the IDE itself at all -- most of them are simply a problem with
feature lists in general. Different features have differing values for
different people, and (particularly) features in general rarely mean
nearly as much as the coherency of the whole product -- a product with
a few features that all work extremely well and are all well
integrated can often outperform one with a huge number of features
that have been kludged together.
 
J

jacob navia

Thanks for your reply. Answer below:

Jerry said:
[ ... ]

Search for a function in WS no yes
Object file cross reference no yes
Display functions by size no yes
Executable statistics no yes
Software metrics no yes
Display include tree no yes
Slice text by local variable no yes
Function tree no yes
Show #ifdefed code in gray no yes


Some of these, while perhaps technically true, are misleading to put
it mildly.

Since Visual Assist is an addon to the VC++ IDE, it's silly for it to
include things that already work perfectly fine in the VC++ IDE, such
as generating a function tree.
Probably, but MSVC doesn't do software metrics, for instance.

Software metrics are important to see the level of complexity that you
have built into a function. (I use the work of Halstead.)
Likewise, finding a function in a workspace is (more or less) built
into VC++ itself -- its workspace view shows a tree of functions,
classes, etc., in alphabetical order. Given that lcc-win32 only does C
(if I'm not mistaken), it seems reasonable to compare them on a C-only
basis. In this case, all functions are in the "globals" section, so
you basically just double click on the function name in the list to go
to it. I suppose this isn't technically "searching for" it, but merely
finding it, but IMO, that's (if anything) an advantage rather than a
weakness.

The search function feature lets you find a function in all loaded
files, not only in the current one. You can use regular expressions,
to make ambiguous search.
Some of these "features" also strike me as close to useless -- just
for example, the "executable statistics". Most of the time this sort
of information is simply superfluous, but when you do need it, you
need a LOT more detail.

I give the following:
Size of code, size of data and size of image. And I see it regularly,
maybe because finding out how big your code is is important in many
contexts. More detail can be queried with the pedump program, that
specializes in that part, and it is included with lcc-win32.

At the current level, it strikes me as kind of
nice and kind of interesting, but unlikely to be of real use on a
regular basis.

Some of the features also seem quite unstable -- at least for me,
attempting to get the #include tree causes the IDE to crash.

If possible, could you give me an example?

I use that feature regularly but I have never seen it crash.
A crash is of course possible, the IDE is not perfect. We are comparing
the work of a team of approx 1000 people (before a release) and
probably like 200 regulars, with the work of a single person.
This is not an excuse of course, and I do try to get any bugs
out when they are reported.
IMO, of these, only the last (the IDE crashing) is really a problem
with the IDE itself at all -- most of them are simply a problem with
feature lists in general. Different features have differing values for
different people, and (particularly) features in general rarely mean
nearly as much as the coherency of the whole product -- a product with
a few features that all work extremely well and are all well
integrated can often outperform one with a huge number of features
that have been kludged together.

You can always say that, meaning that lcc-win32 is a kludge, but you
give nothing as arguments for such assertion. I have tried to select the
features that are substantive and useful for programmers using the IDE.
As you may have seen there are no toolbars, and the presentation is
simple at a graphical level.

Features like "goto definition" have taken me months and months of
development, meaning a whole machinery must be in place to do that,
storing the browse information, devising a format, devising a query, etc.

Specially the slicing of text by a local variable is very useful: you
see *only* the lines that contain that variable, excluding
everything else. This lets you see immediately and very clearly
how a variable is used.

Other features that I did not mention because they aren't "graphical"
are the database of libraries that the IDE has, and that allows it to
tell you which library you should include when you have the dreaded
"missing definition" error.

But it is, as I said in my first message, not something that can be
compared in all aspects with MSVC. It is another philosophy, a
much more simpler approach, better suited to the simple language
it compiles: C.

jacob

P.S. Please try to reproduce the crash and send me a bug report, I would
like to correct that if possible.

Thanks
 
R

red floyd

Jerry said:
[ ... ]

Search for a function in WS no yes
Object file cross reference no yes
Display functions by size no yes
Executable statistics no yes
Software metrics no yes
Display include tree no yes
Slice text by local variable no yes
Function tree no yes
Show #ifdefed code in gray no yes


Some of these, while perhaps technically true, are misleading to put
it mildly.

Since Visual Assist is an addon to the VC++ IDE, it's silly for it to
include things that already work perfectly fine in the VC++ IDE, such
as generating a function tree.

How do I get VC.NET to generate a function tree? I know how it was done
in VC6, but I have yet to figure it out in VC.NET (both 7 and 7.1)
 
M

Martin Ambuhl

Ioannis said:
I do not want to be impolite, however since lcc-win32 is about C, why do
you cross-post in clc++?

Just for the record, his posts are almost all off-topic in comp.lang.c
as well. Since he sees fit to flog his non-standard compiler in clc, he
probably is expanding his horizons to pollute clc++.
 
K

Keith Thompson

red floyd said:
Jerry said:
jacob navia said:
Search for a function in WS no yes
[snip]
Some of these, while perhaps technically true, are misleading to put
it mildly.
Since Visual Assist is an addon to the VC++ IDE, it's silly for it to
include things that already work perfectly fine in the VC++ IDE, such
as generating a function tree.

How do I get VC.NET to generate a function tree? I know how it was
done in VC6, but I have yet to figure it out in VC.NET (both 7 and 7.1)

This stopped being anywhere near topical several articles upthread.
 
J

jacob navia

Ioannis said:
jacob said:



I do not want to be impolite, however since lcc-win32 is about C, why do
you cross-post in clc++?
I just replied, and the headers were set.
Anyway, I have nothing against c++, and I have followed the thread
there, where I got some interesting answers.
 
J

Jerry Coffin

[ ... ]
Probably, but MSVC doesn't do software metrics, for instance.

Software metrics are important to see the level of complexity that you
have built into a function. (I use the work of Halstead.)

If I'd seen a software metric that seemed to produce useful results,
I'd agree. Unfortunately, I've yet to see a strong, positive
correlation between any software metric and real complexity. In fact,
correlation is so weak that it's about as often negative as positive.
Having written a compiler, I'd have thought you'd have noticed by now
that (for one obvious example) nearly every software metric extant
produces truly truly bogus numbers for most hand-written state
machines.

[ ... ]
I give the following:
Size of code, size of data and size of image. And I see it regularly,
maybe because finding out how big your code is is important in many
contexts. More detail can be queried with the pedump program, that
specializes in that part, and it is included with lcc-win32.

[presumably you meant "And I _use_ it regularly," ]

I've yet to see a situation where finding the total size of the code
meant much. It's often important to know the amount that needs to be
loaded before an executable can actually start to execute, but that's
really _quite_ a different number -- it often won't include all the
code in the executable file, and will almost always include code from
various other images (such as DLLs).

This is why I say that when/if this matters, you need a lot more
detail. While your pedump program can (sort of produce) the right
sorts of information given enough manual labor, it's really a kludgy
way to do the job. MS (for one example) provides a profiler intended
specifically for this sort of task that does a great deal more to
automate collecting the information that's really relevant.
At the current level, it strikes me as kind of
If possible, could you give me an example?

For testing, I created a file containing only:

#include <stdio.h>

selected "show includes" under "analysis" and got the standard windows
dialog saying "wedit has encountered a problem and has to close. We
are sorry for the inconvenience." and then asking whether I wanted to
send the crash report to MS.

Doing a quick check, this seems to be entirely repeatable, at least on
this machine.

[ ... ]
You can always say that, meaning that lcc-win32 is a kludge,

That's not what I said. If I meant it, you wouldn't have had to guess
about it either. I'm generally quite explicit about what I mean, and
in this case when I made it as a general comment, that's exactly how I
intended it -- as a general comment. I.e. that it's possible for this
to be the case, not casting aspersions on either of the products in
question.
Features like "goto definition" have taken me months and months of
development, meaning a whole machinery must be in place to do that,
storing the browse information, devising a format, devising a query, etc.

Yes, I'm well aware of the difficulty of building this, and I respect
it a great deal.

[ ... ]
P.S. Please try to reproduce the crash and send me a bug report, I would
like to correct that if possible.

I'll send you more detail in email.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top