How do I Compile from command line instead of inside Visual C++ 2005?



I just finished installing Microsoft Visual C++ 2005 Express
Edition, and then installed the Microsoft Platform SDK, following
the instructions at:

http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

and the test program compiles and runs fine when I open the
Visual C++ 2005 Express Edition program and compile within
the program.

Now my question is can I compile from the command line?

I tried going to the directory where my test program "testsdk.cpp"
was and running the command:
> cl.exe testsdk.cpp

and I got the following output:
--------(begin output)-----------
testsdk.cpp

NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.

For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.

See the SDK release notes for more information.

testsdk.cpp(149) : error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
-------(end output)---------

So first I don't know anything about WINVER and what that warning
message is about, though I would eventually like to compile a
release version. And I don't know why it doesn't compile. Perhaps
there's a bunch of command line switches I'm supposed to add.
(The only thing I'm confident about is that I have no idea what
I'm doing... :)

I tried going to:
http://www.microsoft.com/msdn/sdk
but it just took me directly to:
http://msdn2.microsoft.com/en-us/default.aspx

(I'm not sure if this is the best newsgroup to ask this question.
Let me know if there's a more appropriate newsgroup to post this
question to.)

.



Relevant Pages

  • moved to microsoft.public.vc.ide_general
    ... Let me know if there's a more appropriate newsgroup to post this ... Now my question is can I compile from the command line? ... Windows NT 5.0 and Windows 98 features. ... For this release when WINVER is defined as 0x0500 or greater, ...
    (microsoft.public.vc.mfc)
  • Compile from command line instead of inside Visual C++ 2005 Express Edition?
    ... (I'm not sure if this is the best newsgroup to ask this question. ... Now my question is can I compile from the command line? ... Windows NT 5.0 and Windows 98 features. ... For this release when WINVER is defined as 0x0500 or greater, ...
    (microsoft.public.vc.mfc)
  • Re: Compile from command line instead of inside Visual C++ 2005 Express Edition?
    ... Now my question is can I compile from the command line? ... Windows NT 5.0 and Windows 98 features. ... For this release when WINVER is defined as 0x0500 or greater, ...
    (microsoft.public.vc.mfc)
  • Re: glib20
    ... *** Could not run GLIB test program, ... *** The test program failed to compile or link. ... *** exact error that occured. ... *** Could not run ORBIT test program, ...
    (freebsd-questions)
  • how to set include path for boost library
    ... When I compile a test program using ... But I did modifty djgpp.env to add boost include path ... setting in djgpp seems to be wrong. ...
    (comp.os.msdos.djgpp)