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.
Let me know if there's a more appropriate newsgroup to post this
question to. A lot of smart people in this newsgroup.)

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

-S.R.D.D.
.



Relevant Pages

  • Re: Momentary black screen when program launches
    ... lets say the compiler takes 5 seconds to compile my source. ... seconds is up then I can get back to the Windows desktop and I will see an ... spawned by another program (IDE, Explorer, etc.) ... The Help and Support newsgroup is *terribly* named, ...
    (microsoft.public.windowsxp.general)
  • 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)
  • 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: Socket, C and Windows
    ... I don't think there's nobody that uses win to compile ... This is a newsgroup about standard C. ... But we don't have anything *against* implementation-specific extensions. ... We are not saying they shouldn't be used, or that Windows should not be ...
    (comp.lang.c)
  • How do I Compile from command line instead of inside Visual C++ 2005?
    ... Now my question is can I compile from the command line? ... I tried going to the directory where my test program "testsdk.cpp" ... Windows NT 5.0 and Windows 98 features. ... For this release when WINVER is defined as 0x0500 or greater, ...
    (microsoft.public.vc.ide_general)