Cheap Compiler and a Book

J

Joe C

Unforgiven said:
Just cause everyone else is pointing to GCC, and it wouldn't make sense if
I did too:
Microsoft Visual C++ 2003 Toolkit (compiler, no GUI):
http://msdn.microsoft.com/visualc/vctoolkit2003/
Microsoft Visual C++ 2005 Express Beta (compiler + GUI, but still in beta)
http://lab.msdn.microsoft.com/express/visualc/default.aspx

Both are 100% free.

After reading your post...I decided to take MSVC++2005ExBeta for a
spin...well...after installing over 3GB of stuff on my computer, and several
false starts compiling larger projects that were working with dev-cpp, I
decided to backtrack and get a solo-file "hello world" working. The
resulting "Solution" or "Project" (I don't quite understand the difference
between these two), after being compiled twice, (debug and release) now
resides in a folder that contains an astonishing 3 folders, 23 files, and
6,255,143 bytes of data...which is pretty frickin' amazing.

I'm sure I haven't a clue about anything c++ other than a little standard
console apps knowledge...but MAN DO I FEEL HOBBLED using this software. I'm
having trouble compiling, for example, the zlib library, which I need to
include in another (working on dev-c++) project to test the new
compiler...and even once I get the lib compiled, I'm guessing I'll take a
bit of fiddling to get the library correctly included.

Anyway, unforgiven, you are unforgiven for leading me into donating 3 GB of
HD space and about 12-hrs time investigating the MS Beta ;-) Can anyone
offer performance comparison between this compiler and the MinGW version of
GCC 3.3.x?

Thanks
 
U

Unforgiven

Joe C said:
After reading your post...I decided to take MSVC++2005ExBeta for a
spin...well...after installing over 3GB of stuff on my computer, and
several

That's odd. The VC2005 express beta installs two things, the .Net Framework
2.0 beta and itself (also the MSDN Library if you let it, but I didn't). On
my system, the .Net Framework takes about 132MB (size of the
C:\Windows\Microsoft.Net\Framework\v2.0.40607 folder). And my entire
C:\Program Files\Visual Studio 8 folder is only 327MB, and I have Visual
Basic 2005 Express, Visual C++ 2005 Express and Visual Web Developer 2005
Express installed. Where did it put those 3GB? Also, if this is true, I want
to know what compression they use to turn a 70MB download into a 3GB
install. ^_^
false starts compiling larger projects that were working with dev-cpp, I
decided to backtrack and get a solo-file "hello world" working. The
resulting "Solution" or "Project" (I don't quite understand the difference
between these two), after being compiled twice, (debug and release) now

A project is a collection of files and settings that'll be compiled into an
executable. A project file is (vaguely) comparable to a makefile for a
single target.
A solution is a collection of projects. They're the equivalent of a
workspace in VC6, or a project group in VB6. A project is always part of a
solution. If you have the full Visual Studio 2005, you can also mix
different language (C#, C++, VB.NET) projects in a single solution.
resides in a folder that contains an astonishing 3 folders, 23 files, and
6,255,143 bytes of data...which is pretty frickin' amazing.

This could easily be true, although I can't explain the third folder. Debug,
Release and what third one? What project type did you pick, not "Console
Application (.Net)" I hope, since, as the name indicates, this creates a
project to support .Net (C++/CLI) and compiles to IL, not just a normal
native C++ application. For that you should pick "Console Application
(Win32)" (you should also set that one to create an empty project unless
you're willing to deal with precompiled header files)

VC has never been terribly economic in its use of intermediate files, for
every configuration (Debug or Release or other userdefined) it will create
at least a .obj file for every .cpp file, a .pch file for every precompiled
header (typically either 0 or 1), .ilk and .idb files to facilitate
incremental linking (which makes everything a lot faster when you compile
after changing only one source file), .pdb with debugging information (only
if you selected to output debug symbols), .manifest files which don't seem
to have much use (you can also turn them off in the project options). Add to
that the solution and project files .sln, .vcproj, .suo, .vcproj.user and
the .ncb (IntelliSense database) so you can understand the overhead for a
single-file project becomes large. The relative overhead becomes better if
your project becomes larger though. I just tried the same thing with Visual
Studio .Net 2003, and the result had slightly less files but took even more
space. Too bad I don't have Borland installed right now, my experience with
them tells me they're probably even worse.

In any case I'd suggest you not to be idle about it. Go to
http://lab.msdn.microsoft.com/vs2005/ (or directly to
http://lab.msdn.microsoft.com/productfeedback/) and file a suggestion or
bugreport for anything you don't like. This is beta 1, so right now the
chances are still good they'll listen if you have a good suggestion.
 
J

Joe C

Unforgiven said:
That's odd. The VC2005 express beta installs two things, the .Net
Framework 2.0 beta and itself (also the MSDN Library if you let it, but I
didn't). On my system, the .Net Framework takes about 132MB (size of the
C:\Windows\Microsoft.Net\Framework\v2.0.40607 folder). And my entire
C:\Program Files\Visual Studio 8 folder is only 327MB, and I have Visual
Basic 2005 Express, Visual C++ 2005 Express and Visual Web Developer 2005
Express installed. Where did it put those 3GB?

Actually, I wasn't totally honest...I got the VC2005 EX Beta and. since the
download docs said, "When you install this Express Beta release, you should
choose to install both the MSDN Express Library and SQL Server 2005 Express.
If you do not install SQL Server 2005 Express or the MSDN Express Library
when you first install your Express product, you will need to install it
separately. ", I thought I should comply. And then I (thought) I had to get
the SDK. These taken together are a pretty meaty bunch of downloads. But
then, *sigh*, I got carried away and did the XP ServicePack2 while i was
there...and the .net result is that ~3GB space vanished from my hard-drive.
Also, if this is true, I want to know what compression they use to turn a
70MB download into a 3GB install. ^_^

Well...files *can* be expanded even if they aren't compresed ;-)
A project is a collection of files and settings that'll be compiled into
an executable. A project file is (vaguely) comparable to a makefile for a
single target.
A solution is a collection of projects. They're the equivalent of a
workspace in VC6, or a project group in VB6. A project is always part of a
solution. If you have the full Visual Studio 2005, you can also mix
different language (C#, C++, VB.NET) projects in a single solution.

Thanks for the explaination. The "solution" concept to make it easy to
combine modules compiled from different languages sounds like a good one.
This could easily be true, although I can't explain the third folder.
Debug, Release and what third one?

Well...I put one called "source" inside the project folder. Just contained
the microscopic cpp file though...
What project type did you pick, not "Console Application (.Net)" I hope,
since, as the name indicates, this creates a project to support .Net
(C++/CLI) and compiles to IL, not just a normal native C++ application. For
that you should pick "Console Application (Win32)"

Yes, it was win32 console app
you're willing to deal with precompiled header files)
Thanks for the tip.
VC has never been terribly economic in its use of intermediate files, for
every configuration (Debug or Release or other userdefined) it will create
at least a .obj file for every .cpp file, a .pch file for every
precompiled header (typically either 0 or 1), .ilk and .idb files to
facilitate incremental linking (which makes everything a lot faster when
you compile after changing only one source file), .pdb with debugging
information (only if you selected to output debug symbols), .manifest
files which don't seem to have much use (you can also turn them off in the
project options). Add to that the solution and project files .sln,
.vcproj, .suo, .vcproj.user and the .ncb (IntelliSense database) so you
can understand the overhead for a single-file project becomes large. The
relative overhead becomes better if your project becomes larger though. I
just tried the same thing with Visual Studio .Net 2003, and the result had
slightly less files but took even more space. Too bad I don't have Borland
installed right now, my experience with them tells me they're probably
even worse.

In any case I'd suggest you not to be idle about it. Go to
http://lab.msdn.microsoft.com/vs2005/ (or directly to
http://lab.msdn.microsoft.com/productfeedback/) and file a suggestion or
bugreport for anything you don't like. This is beta 1, so right now the
chances are still good they'll listen if you have a good suggestion.
Good advice. I may experiment more with the compiler and offer feedback.
There's a pretty steep learning curve that is making it difficult for me to
test the compiler with pre-existing code...but I wasn't really complaining.

Thanks again for the info.

joe
 
U

Unforgiven

Joe C said:
Actually, I wasn't totally honest...I got the VC2005 EX Beta and. since
the download docs said, "When you install this Express Beta release, you
should choose to install both the MSDN Express Library and SQL Server 2005
Express. If you do not install SQL Server 2005 Express or the MSDN Express
Library when you first install your Express product, you will need to
install it separately. ", I thought I should comply. And then I (thought)
I had to get the SDK. These taken together are a pretty meaty bunch of
downloads. But then, *sigh*, I got carried away and did the XP
ServicePack2 while i was there...and the .net result is that ~3GB space
vanished from my hard-drive.

That should explain it. XPSP2 is defenitely a good idea. ^_^
You won't need the SQL Server 2005 Express beta unless you plan on working
with SQL Server hosted databases, and I'm not sure exactly what is in that
release of the MSDN Library. Since you're experienced with using Visual
Studio installing it may have been a good idea. I probably don't need most
of what's in there because I've been using Visual Studio for a long time (or
parts of it anyway).
Thanks for the explaination. The "solution" concept to make it easy to
combine modules compiled from different languages sounds like a good one.

One of the cool things of Visual C++ 2005 (although I don't think Express
can do it, only the full version) is that the C++ linker (when generating
..Net assemblies, not native files) can consume .Net modules. As a result the
Visual C++ build system is the only part of Visual Studio 2005 where you can
use different languages *in the same project*, and compiled to just one
binary. VB and C# cannot do that. There you will need the solutions.

Even if just using one language the solution concept can make sense. For
instance if you're developing a DLL and an application that consumes the DLL
together.
Well...I put one called "source" inside the project folder. Just
contained the microscopic cpp file though...


Yes, it was win32 console app

That's okay then. I just noticed you can actually use the Console App
(Win32) project template to create other (Windows app, DLL) Win32 projects
as well. That doesn't make much sense...
Thanks for the tip.

Precompiled header files, to give a short explanation, prevent the compiler
from having to reparse header files for every source file in your project
that uses them. They can save an awful lot of compilation time, especially
if you include big header files such as said:
Good advice. I may experiment more with the compiler and offer feedback.
There's a pretty steep learning curve that is making it difficult for me
to test the compiler with pre-existing code...but I wasn't really
complaining.

VC is a really good development environment (it blows Borland out of the
water on everything except GUI development, at least imho), and especially
if you tend to use multiple products from Visual Studio like Visual Basic
..Net and Visual C# next to Visual C++ the fact they all work basically the
same is really convenient. VC has always been lacking on the compiler front,
but VC2003 (7.1) basically caught up (as far as I know the only two standard
features it doesn't support are export and exception specifications).
Whidbey (codename for 2005) is looking pretty promising so far, with lots of
performance and security tweaks, as well as several cool new features
(although many of those are in the C++/CLI department).

Oh, and before I forget, you can update the compiler to a newer build by
downloading the Visual C++ 2005 Tools Refresh:
http://www.microsoft.com/downloads/...f1-9d16-439a-9a5e-e13eb0341923&displaylang=en
Thanks again for the info.

You're welcome.
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top