Ok, here’s a simple issue, I imagine:
I have a driver that happily builds in the 7600 SDK. However, due to requirements I need to use version 1.7 of the WDF, so I installed the 6000 DDK, opened a Vista build window, issued the BLD command… and it complains that it can’t find wdf.h! It’s right there in the 6000 DDK… so… why can’t the compiler find it?
I’m assuming some include path isn’t set somewhere, but I’m not sure where it has to be set for the 6000 DDK… 7600 worked “out of the box”.
Suggestions, comments?
…ed…
Do a full rebuild. You likely have dependency crap from the previous WDK
build polluting your new build environment.
Mark Roddy
On Tue, Sep 21, 2010 at 12:02 PM, wrote:
> Ok, here’s a simple issue, I imagine:
>
> I have a driver that happily builds in the 7600 SDK. However, due to
> requirements I need to use version 1.7 of the WDF, so I installed the 6000
> DDK, opened a Vista build window, issued the BLD command… and it complains
> that it can’t find wdf.h! It’s right there in the 6000 DDK… so… why can’t
> the compiler find it?
>
> I’m assuming some include path isn’t set somewhere, but I’m not sure where
> it has to be set for the 6000 DDK… 7600 worked “out of the box”.
>
> Suggestions, comments?
>
> …ed…
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
In “sources”, does INCLUDES have a path set to include the path to the 6000
directories? You may have installed but you need to adjust your build paths
to use it. It may be as simple as setting one environment to the 6000 WDK.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@woolyloach.com
Sent: Tuesday, September 21, 2010 11:03 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Can’t find WDF.h building in DDK 6000
Ok, here’s a simple issue, I imagine:
I have a driver that happily builds in the 7600 SDK. However, due to
requirements I need to use version 1.7 of the WDF, so I installed the 6000
DDK, opened a Vista build window, issued the BLD command… and it complains
that it can’t find wdf.h! It’s right there in the 6000 DDK… so… why can’t
the compiler find it?
I’m assuming some include path isn’t set somewhere, but I’m not sure where
it has to be set for the 6000 DDK… 7600 worked “out of the box”.
Suggestions, comments?
…ed…
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Hi Mark, good idea - but no joy, I’m afraid.
I have the 7600 DDK build env open now, I’ll see if anything is obviously missing… I’m sure it’s just something I’ve done wrong… “#include <wdf.h>” seems pretty strightforward!
…ed…</wdf.h>
Gary, my SOURCES is pretty simple:
TARGETNAME=HDAudTestDrv
TARGETPATH=obj
TARGETTYPE=DRIVER
USE_WDF_STATIC=1
KMDF_VERSION_MAJOR=1
INCLUDES=$(BASEDIR)\inc;…\inc
SOURCES=HDAudTestDrv.cpp hw_hdaudio.cpp
TARGET_DESTINATION=wdf
…BASEDIR points to the right place… is it possible that the 7600 DDK is “smarter” about includes and picks up The Right WDF Directory™? Let me add it to the INCLUDES and see if that fixes things, odd that 7600 would be fine without it. :-/
Ok, thanks Gary - it needed to be explicitly added for 6000. It compiles but now the link fails as it’s not picking up the WDF libraries, but I’m sure with a little research I should be able to figure out how to get those tacked on.
Thanks to everyone for your help!
…ed…
xxxxx@woolyloach.com wrote:
Gary, my SOURCES is pretty simple:
TARGETNAME=HDAudTestDrv
TARGETPATH=obj
TARGETTYPE=DRIVER
USE_WDF_STATIC=1
By the way, that line does nothing. The early betas of KMDF allowed
static linking, but none of the released versions do.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
@Tim - ok, cool - I’ll take it out to prevent future confusion.
Down to 2 link errors now:
errors in directory c:\diagsources\src\hdaudtestdriver\srcc:\delldiagsources\src\addf\hdaudtestdriver\src\hdaudtestdrv.obj : error LNK200 : unresolved external symbol _WdfFunctions
c:\diagsources\src\hdaudtestdriver\src\hdaudtestdrv.obj : error LNK200 : unresolved external symbol _WdfDriverGlobals
c:\diagsources\src\hdaudtestdriver\src\objfre_wlh_x86\i386\hdaudtestdr.sys : error LNK1120: 2 unresolved externals
…time to search to see where these live.
…ed…
Get rid of
USE_WDF_STATIC=1
And
TARGET_DESTINATION=wdf
You don’t need $(BASEDIR)\inc in INClUDES
Look at the build logs and look for the cmd line to cl.exe, specifically all of the lines which have the /I flag
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@woolyloach.com
Sent: Tuesday, September 21, 2010 9:23 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Can’t find WDF.h building in DDK 6000
Gary, my SOURCES is pretty simple:
TARGETNAME=HDAudTestDrv
TARGETPATH=obj
TARGETTYPE=DRIVER
USE_WDF_STATIC=1
KMDF_VERSION_MAJOR=1
INCLUDES=$(BASEDIR)\inc;…\inc
SOURCES=HDAudTestDrv.cpp hw_hdaudio.cpp
TARGET_DESTINATION=wdf
…BASEDIR points to the right place… is it possible that the 7600 DDK is “smarter” about includes and picks up The Right WDF Directory™? Let me add it to the INCLUDES and see if that fixes things, odd that 7600 would be fine without it. :-/
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
These get resolved/added to the link command line (wdfdriverentry.lib) automatically when you add
KMDF_VERSION_MAJOR=1
To your sources file
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@woolyloach.com
Sent: Tuesday, September 21, 2010 9:56 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Can’t find WDF.h building in DDK 6000
@Tim - ok, cool - I’ll take it out to prevent future confusion.
Down to 2 link errors now:
errors in directory c:\diagsources\src\hdaudtestdriver\srcc:\delldiagsources\src\addf\hdaudtestdriver\src\hdaudtestdrv.obj : error LNK200 : unresolved external symbol _WdfFunctions c:\diagsources\src\hdaudtestdriver\src\hdaudtestdrv.obj : error LNK200 : unresolved external symbol _WdfDriverGlobals c:\diagsources\src\hdaudtestdriver\src\objfre_wlh_x86\i386\hdaudtestdr.sys : error LNK1120: 2 unresolved externals
…time to search to see where these live.
…ed…
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Sure- 6000 WDK will give you WDF 1.5, for one thing.
For 1.7 you need the final 6001 WDK- I think that was 6001.18003, but I could be mistaken about that.
-----Original Message-----
Ok, here’s a simple issue, I imagine:
I have a driver that happily builds in the 7600 SDK. However, due to requirements I need to use version 1.7 of the WDF, so I installed the 6000 DDK, opened a Vista build window, issued the BLD command… and it complains that it can’t find wdf.h! It’s right there in the 6000 DDK… so… why can’t the compiler find it?
I’m assuming some include path isn’t set somewhere, but I’m not sure where it has to be set for the 6000 DDK… 7600 worked “out of the box”.
Suggestions, comments?
…ed…
Also seeing the rest of the thread- the macros needed to say “I am using KMDF” went through some name changes between 6000 and 7600- don’t recall if they changed in 6001 and don’t have time to look.
Take a look at the KMDF samples in the DDK you are using to see how they code it. The changes are described in the release notes for the appropriate WDK, but you’d need to look at the WDK in which they changed (not the one you are trying to use) to find them. So looking at the samples is probably much faster.
-----Original Message-----
Subject: RE: [ntdev] Can’t find WDF.h building in DDK 6000
Sure- 6000 WDK will give you WDF 1.5, for one thing.
For 1.7 you need the final 6001 WDK- I think that was 6001.18003, but I could be mistaken about that.
-----Original Message-----
Ok, here’s a simple issue, I imagine:
I have a driver that happily builds in the 7600 SDK. However, due to requirements I need to use version 1.7 of the WDF, so I installed the 6000 DDK, opened a Vista build window, issued the BLD command… and it complains that it can’t find wdf.h! It’s right there in the 6000 DDK… so… why can’t the compiler find it?
I’m assuming some include path isn’t set somewhere, but I’m not sure where it has to be set for the 6000 DDK… 7600 worked “out of the box”.
Suggestions, comments?
…ed…
Add it explicitly to you the TARGETLIBS.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@woolyloach.com
Sent: Tuesday, September 21, 2010 11:27 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Can’t find WDF.h building in DDK 6000
Ok, thanks Gary - it needed to be explicitly added for 6000. It compiles
but now the link fails as it’s not picking up the WDF libraries, but I’m
sure with a little research I should be able to figure out how to get those
tacked on.
Thanks to everyone for your help!
…ed…
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Oh, what the heck, I looked it up.
If you really want to use 6000 WDK (which is KMDF 1.5 and not 1.7).:
Change KMDF_VERSION_MAJOR=1
To
KMDF_VERSION=1
In your sources file.
AFAICT (from my hazy memory of ship dates versus hands on access to what change happened when) with the proper WDK for 1.7, this would not be necessary- it uses the same macro as the 7600, and so it would just work.
Ok, with you fine folks able assistance and digging through the DDK samples, I have the darn thing loading under Vista! Thanks a TON for all the help, now I can move on to the more gory parts of this driver. 
…ed…
Bob - let me try to chase down 6001, that should work fine - 1.7 is “lowest common denominator” for installing under Vista.
So far, it works on Vista SP1 and Win7 - but my next challenge will be getting it working under WinPE. So far drvload reports success but it’s not showing up in the object space (based on what the Winobj program shows, at least) - devcon just says “devcon failed”. Nothing terribly informative in the setupapi.dev.log file, it just seens to reach a point and then silently quits.
I love a challenge… off to re-re-read the MSDN WinPE documentation…