Re: good books to start from scratch
Jeffrey Schwab wrote:
> gamerfry@gmail.com wrote:
[...]
> Could you be more specific? I'm not a fan of Microsoft, but
> the most recent version of the compiler seems to be OK from
> the command-line, once you get used to the non-intuitive
> switches and unclear error messages.
Just curious (I'm not a fan of Microsoft either), but do you
know of any compilers which have intuitive switches and clear
error messages?
With regards to the switches, there is a problem with the
Microsoft compiler, in that you cannot compile any program using
standard headers without two or three additional options.
> If you have included any headers that use exceptions (e.g.
> <iostream>), you may need to enable them with a switch:
> cl /EHsc your_source_file.cc
I've found /GR to also be necessary, and you need yet another
option if you want pointers to member functions to work across
compilation unit boundaries (but I can't imagine that being a
problem in beginner's code).
> If this is not the problem you have encountered, please create
> a text file called main.cc and enter the following in it:
> int main() { }
> Open a command prompt and cd to the directory containing
> main.cc. Enter:
> cl main.cc
> What happens?
Lot's of messages about not being able to find different
DLL's:-).
Seriously, *installing* the compiler so it can be used from a
Cygwin environment is non-trivial. On the other hand, the
documentation explains very clearly how to do this -- I was
actually very surprised that Microsoft took Unix programmers so
much into consideration -- they don't actually mention bash, but
there is a page in the documentation about invoking the compiler
from the command line, and it goes into considerable detail
about handling the path variable, etc.
> Btw, you will be more likely to get positive results from your
> posts if you do not abbreviate "you" to "u" or "are" to "r".
> Don't skip apostrophes ("dont") or use lowercase "i" when you
> mean "I." You can of course post anything you like, but a
> little bit of effort makes life easier for all of us.
I'm not sure about "anything you like" -- I've had posts
rejected (correctly) because I accidentally wrote them in
French. And "u" is no more an English word than "tu" is.
--
James Kanze kanze.james@neuf.fr
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France +33 (0)1 30 23 00 34
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]