Discussion:
cl.exe
(too old to reply)
BigNVista
2007-03-27 23:53:59 UTC
Permalink
I am trying to compile the example at:
http://msdn2.microsoft.com/en-us/library/aa382690.aspx.

I successfully completed the steps up to the cl.exe. When I try the cl.exe
step, I get the following error:
welbeg.cpp(4) : fatal error C1083: Cannot open include file: 'windows.h': No
suc
h file or directory.

I am using the cl.exe version in the Vista Platform SDK.

When I tried using the cl.exe from VS 2005, I had to copy the wevtapi.lib,
evntprov.h, winevt.h file to the VS2005/VC/PlatformSDK directory. Then when
I tried cl.exe I received linkage errors.

Also the advapi32.lib in the Vista platform SDK is a different version from
the one in the VS2005 Platform SDK lib.

Is this example out of date? I would prefer to use the cl.exe from the
command line to build my executable. If not I assume I should use C# for my
event logging?

I am using Vista Retail, Vista Platform SDK, and VS 2005 pro.

Any suggestions would be appreciated.
William DePalo [MVP VC++]
2007-03-28 00:16:21 UTC
Permalink
Post by BigNVista
http://msdn2.microsoft.com/en-us/library/aa382690.aspx.
I successfully completed the steps up to the cl.exe. When I try the cl.exe
welbeg.cpp(4) : fatal error C1083: Cannot open include file: 'windows.h': No
suc
h file or directory.
I am using the cl.exe version in the Vista Platform SDK.
The command line compiler looks for include files among the directories
specified by the environmental variable INCLUDE. You can type

SET INCLUDE

at the command line to see how those directories are set in your
installation.

Both the compiler and the SDK require their own set of includes. You can set
the directories for the compiler by running the file

vsvars32.bat

and for the SDK by running

SetEnv.bat

Regards,
Will
www.ivrforbeginners.com
BigNVista
2007-03-28 01:13:36 UTC
Permalink
Nevermind I just saw the /I switch.
Post by BigNVista
http://msdn2.microsoft.com/en-us/library/aa382690.aspx.
I successfully completed the steps up to the cl.exe. When I try the cl.exe
welbeg.cpp(4) : fatal error C1083: Cannot open include file: 'windows.h': No
suc
h file or directory.
I am using the cl.exe version in the Vista Platform SDK.
When I tried using the cl.exe from VS 2005, I had to copy the wevtapi.lib,
evntprov.h, winevt.h file to the VS2005/VC/PlatformSDK directory. Then when
I tried cl.exe I received linkage errors.
Also the advapi32.lib in the Vista platform SDK is a different version from
the one in the VS2005 Platform SDK lib.
Is this example out of date? I would prefer to use the cl.exe from the
command line to build my executable. If not I assume I should use C# for my
event logging?
I am using Vista Retail, Vista Platform SDK, and VS 2005 pro.
Any suggestions would be appreciated.
Loading...