On 20.06.2010 18:43, Doug Semler wrote:
> On Sun, Jun 20, 2010 at 12:03 PM, Henry N.<[email protected]>  wrote:
>>   Hello,
>>
>> in the 32 bit build environment a simple include like
>>
>>   >>>  cat check.c>>>
>>      #include<ddk/ntddk.h>
>> <<<  end check.c<<<
>>
>> works with that command line:
>>
>>      i686-pc-mingw32-gcc -c check.c
>>
>> With the 64 bit toolchain (20100604_sezero) and headers from
>> mingw-w64/experimental/ddk_test SVN 2511:
>>
>>      x86_64-w64-mingw32-gcc -c check.c
>>
>> this fails with missing headers, for example:
>> .../x86_64-w64-mingw32/include/ddk/ntddk.h:38:17: error: wdm.h: No such
>> file or directory
>> .../x86_64-w64-mingw32/include/ddk/ntddk.h:42:17: error: mce.h: No such
>> file or directory
>>
>> I know, that I can set "-I$PREFIX/x86_64-w64-mingw32/include/ddk". But,
>> the $PREFIX is a problem in this case. This needs an absolute path. The
>> toolchain I can install somewhere and simple set the variable PATH for
>> the binaries is enough to work. But now, for the DDK headers I need to
>> know the absolute PATH of toolchin in the project Makefile for the the
>> include path. :-(
>>
>> Any ideas?
>>
>> Is using  "#include<ddk/ntddk.h>" a generally foul, and I needs to use
>> "#include<ntddk.h>"?
>>
>> --
>
> If I remember correctly, even the MS DDK suffers this "problem".
> However the reason that you don't see it is that the batch file that
> is used to set up the build environment includes the install location
> in the include path.
>
> I really don't know the best way to handle it, because if you #include
> <ddk/ntddk.h>  I don't think you'll pick up the files properly when
> building under msvc.
>
> I'll have to think about this...
>

https://sourceforge.net/tracker/?func=detail&atid=983354&aid=3033864&group_id=202880,
 
Sezero wrote in Bug #3033864:
> Note #2: Do you still have a problem with ntddscsi.h or is it solved  too?

The problem is porting older source from mingw32-w32 (older 32 bit 
toolchain) and make it able to build for 64 bit now, and a wish to use 
the same source for 32 bit again. Under 32 bit the ntddscsi.h exist only 
under .../include/ddk/ntddscsi.h, and now it exist under 
.../include/ntddscsi.h

Under mingw32-w32 have not set extra path for ddk-headers, and must use 
includes for kernel driver in such way:

   #include <ddk/ntddscsi.h>

For mingw32-w64 I must add include path for ddk headers to gcc options 
and must remove diretory "ddk/" from include statement:

   #include <ntddscsi.h>

As result I have such code lines now:

   #include <ddk/ntddk.h>
   #ifndef WIN64
     #include <ddk/ntapi.h>
   #endif
   #include <ddk/ntifs.h>
   #include <ddk/ntdddisk.h>
   #ifdef WIN64
     #include <ntddscsi.h>
   #else
     #include <ddk/ntddscsi.h>
   #endif

-- 
Henry N.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to