Okay I finally figured it out.
The problem with the DDK headers in the MinGW-w64 SVN is that there are
still headers missing (like ntdef.h among others).
After messing around for a good while with trying to combine the MinGW and
MinGW-w64 headers together to complete the puzzle, I finally gave up on
that plan of attack. I remember reading that the DDK for MinGW-w64 was
based on the ReactOS codebase. So I grabbed the DDK headers from there and
tried again with similar results. But after some more poking around I found
that the ReactOS DDK headers were referencing headers found in a folder
called "psdk" (which happened to contain the headers I was missing in
MinGW-w64). So I copied the "ddk" and "psdk" folders over, added the
include paths, and now everything is in business. At least for a Hello
World driver.
Here is the location of the "ddk" and "psdk" header files in the ReactOS
SVN:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/
I still get one warning:
wdm.h:6679: warning: declaration does not declare anything
But it seems harmless and definitely caught my eye as far as ironic error
messages are concerned. Kinda sounds like line 6679 was either written by a
politician or a cable news journalist.
I do urge the inclusion of the DDK (and "psdk") headers in the default
builds. It is nice to be able to use the same open toolchain for both
application and driver development...especially since I don't think the
Microsoft DDK will work on Linux.
Thanks,
Kyle
On May 3, 2010 6:09am, Ozkan Sezer <[email protected]> wrote:
On Mon, May 3, 2010 at 12:11 PM, Kyle Stewart [email protected]> wrote:
> I would like to use MinGW-w64 as my one stop shopping toolchain for
> targeting the Windows platform including driver development, but I have
run
> into a snag. I have downloaded the latest personal builds for both x86
and
> x64 targets. I am running a x64 Windows 7 host and I have successfully
used
> the 32 bit target toolchain to build Qt 4.6. My next step was to get a
> simple hello world driver working. All the driver does is provide a
> DriverEntry and DriverUnload function with some debug statements to let
me
> know things are working. I have been able to build the driver using the
> default MinGW bundle since they package the DDK along with the regular
> install with some tips found here:
>
> http://strdup.livejournal.com/34596.html
>
> So I know the code is okay. I have checked out the current mingw-w64
code
> out of the SVN and found the DDK headers. I copied the DDK folder over
to
> where my local MinGW-w64 installations. It seems as thought things are
> incomplete, however. After placing the appropriate search paths for the
new
> headers in the gcc compile command I get a large screenful of errors.
Here
> is the first few lines:
>
> In file included from
>
M:\Development\mingw\mingw32_win64\i686-w64-mingw32\include\ddk/ntddk.h:40,
> from driver.c:1:
>
M:\Development\mingw\mingw32_win64\i686-w64-mingw32\include\ddk/wdm.h:39:19:
> error: ntdef.h: No such file or directory
>
M:\Development\mingw\mingw32_win64\i686-w64-mingw32\include\ddk/wdm.h:41:22:
> error: ntiologc.h: No such file or directory
>
M:\Development\mingw\mingw32_win64\i686-w64-mingw32\include\ddk/wdm.h:62:22:
> error: dpfilter.h: No such file or directory
>
> So it can find ntddk.h but not the some of the header dependencies of
> ntddk.h. The headers mentioned in the error messages don't seem to be
> anywhere to be found in the MinGW-w64 SVN checkout, but they do exist
in the
> MinGW headers. Am I missing something? Is it safe to simply copy the DDK
> folder from the MinGW bundle over to MinGW-w64 folder? Any help would be
> appreciated.
>
> Regards,
>
> Kyle
The DDK headers were not installed by default in the toolchain (I
will remember to install them bydefault in future builds.) In the
interim, just download the ddk headers from svn, here:
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/branches/releases/v1.0/mingw-w64-headers/ddk/
--
Ozkan
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public