=?windows-1252?Q?Re=3A_error=3A_expected_unqualified=2Did_before_=91namespa?=
=?windows-1252?Q?ce'?=
On Jun 2, 6:23 pm, "Martijn Mulder" <i@m> wrote:
Yes it does. This is the content from the Makefile that is
generated with cmake:
# CMAKE generated file: DO NOT EDIT!
DO NOT use makefiles. They make your life miserable. With a
little work you can use scripts and response files that give
you all the flexibility you need. I don't know for Ubuntu, but
on Windows (yes, Microsoft) I can simply type
C:\cl.exe bob.cpp
and your program compiles without errors
I'd be very surprised. You have a very hacked installation if
cl is directly in the root directory of drive C:. If you've
installed the compiler correctly and set up your environment
like Microsoft recommends for command line invocation,
cl bob.cpp
should work, but that's only true for the simplest programs. In
practice, you need a number of additional options to get
anything usable. Something like:
cl -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE -vmg -GR -Gy -EHs -
Zc:forScope,wchar_t -J -MDd -GS- -Zi -w -D_DEBUG bob.cpp
So you'll want to put it into a batch file or a makefile---all
things considered, the make file is simpler, and does more.
I'm not familiar with cmake or nmake, but gmake---and all of the
usual Unix make's---support macros and generic rules, so you
don't have to write the command out for each file. A typical
gmake file for compiling and linking might be something as
simple as:
sources = bob.cpp
include $(makefileRoot)/binary.mk
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34