Glad that you are closer to getting your stuff working. Though I think you
might have a misconception about how the WDK environments work. Unless you
have code that conditionally compiles in Vista+ DDIs when a Vista+
environment is encountered, the best practice *is* to use the build
environment for the oldest OS you intend to support, from the newest WDK
that supports that OS.
The only difference in the Build environments for specific OS versions is
the headers with DDI declarations and libs that expose the DDIs present in
that OS version. The compiler and linker are the same, and I don’t know of
any OS version differences in the compiler and linker flags, just the
defines that expose or hide DDIs in the headers.
So the takeaway is to use the XP 32 and 2003 x64 environments, if those are
your oldest supported OS versions, unless you are specifically using DDIs
that were included in newer OS versions, in which case you’ll have to use
conditional compilation, and figure out how to do the same thing yourself in
the older OS versions, and build multiple driver versions based on the
target OS.
Phil
Philip D. Barila??? (303) 776-1264
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@a-bit-of-help.com
Sent: Monday, March 28, 2011 2:56 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WinDDK cross compiling problem…
Hi Everyone,
Thank you very much for your ideas and explanations! I looked at our 64 bit
system and saw that we are using the X86 and X64 checked environments for
Vista. So, as I understand it, when I moved the cross compiled x86 driver
and test application to our WinXP 32-bit test computer, they would fail
because they were built to target Vista and not WinXP. I read more about
the build environments in the Docs and it basically said that I can build
for the supported target OS and platform (x86/amd64/ia64) by using the
matching build environment. More simply put, we need to use the
corresponding build environment for the corresponding target OS(s).
i.e. On our Win7, 64-bit dev computer, I can open the WinXP build
environment and build the various radix versions for target WinXp systems.
So, this is the best practice… We do not want to build a least common
denominator version (i.e. WinXP environment) and try to use it on Win7,
etc., because each build environment optimizes its build for the target
system.
This afternoon, I will open the WinXP Checked Environment and build our
driver and test application. I will copy them to our WinXP Pro SP3 32-bit
system, and see if things work.
Thank you again for your help and sharing your knowledge!
Mike