Hi,

I had a simple driver compiled and working under Visual Studio 6.0 and
Windows 2000 DDK on a Win@K system. I wanted to try to get it compile on
my WinXP professional system.

I got Windows Server 2003 DDK installed, from the documentation, it
seems to suppose to work with WinXP and 2000. When I tried to compile
the project, I got the following error:

G:\WINDDK\3790\INC\DDK\WNET\NTDDK.h(23) : fatal error C1189: #error :
Compiler version not supported by Windows DDK
It failed on this statement.
#if _MSC_VER < 1300

From Walter Oney's book, I was suppose to use Win.NET DDK and VS 6.0. I
only saw this server DDK, WinXP, Win2000 DDK. Which DDK was I suppose
to use? Does this version of DDK not suppose work with VS 6.0?


I tried to compile the same project under VS.NET 2003, it did not give a
compiler version problem but I got a linker error:

something.obj : error LNK2019: unresolved external symbol
___CxxFrameHandler referenced in function
__ehhandler$?somefunc@@YGHPAUSomestuct@@@Z
Release\somedriver.SYS : fatal error LNK1120: 1 unresolved externals

I am not sure what caused this linker error.

I am fairly new in this driver development, any pointer would be greatly
appreciated. Thanks in advance!

Linda Yang

Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by Maxim

Maxim
Mon Feb 02 17:49:57 CST 2004

> to use? Does this version of DDK not suppose work with VS 6.0?

Maybe. MS never promised that any DDK will work with VC++.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by Gary

Gary
Mon Feb 02 18:32:37 CST 2004

You should have the latest DDK installed. That includes the "blessed"
compiler and tools for driver development. You will have wither manually set
your executable paths in Visual Studio to the path of the WinDDK 3790
compiler, or download DDKBUILD and change your VS build lines to use
DDKBUILD. The latter is by far the least painful and the recommended route.

--
Gary G. Little
Seagate Technologies, LLC

"Linda Yang" <hyang@signalogic.com> wrote in message
news:igATb.12602$tz.7970@newssvr22.news.prodigy.com...
> Hi,
>
> I had a simple driver compiled and working under Visual Studio 6.0 and
> Windows 2000 DDK on a Win@K system. I wanted to try to get it compile on
> my WinXP professional system.
>
> I got Windows Server 2003 DDK installed, from the documentation, it
> seems to suppose to work with WinXP and 2000. When I tried to compile
> the project, I got the following error:
>
> G:\WINDDK\3790\INC\DDK\WNET\NTDDK.h(23) : fatal error C1189: #error :
> Compiler version not supported by Windows DDK
> It failed on this statement.
> #if _MSC_VER < 1300
>
> From Walter Oney's book, I was suppose to use Win.NET DDK and VS 6.0. I
> only saw this server DDK, WinXP, Win2000 DDK. Which DDK was I suppose
> to use? Does this version of DDK not suppose work with VS 6.0?
>
>
> I tried to compile the same project under VS.NET 2003, it did not give a
> compiler version problem but I got a linker error:
>
> something.obj : error LNK2019: unresolved external symbol
> ___CxxFrameHandler referenced in function
> __ehhandler$?somefunc@@YGHPAUSomestuct@@@Z
> Release\somedriver.SYS : fatal error LNK1120: 1 unresolved externals
>
> I am not sure what caused this linker error.
>
> I am fairly new in this driver development, any pointer would be greatly
> appreciated. Thanks in advance!
>
> Linda Yang
>



Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with by Linda

Linda
Tue Feb 03 18:52:07 CST 2004

Gary G. Little wrote:

> You should have the latest DDK installed. That includes the "blessed"
> compiler and tools for driver development. You will have wither manually set
> your executable paths in Visual Studio to the path of the WinDDK 3790
> compiler, or download DDKBUILD and change your VS build lines to use
> DDKBUILD. The latter is by far the least painful and the recommended route.
>

Thanks for replying. I did some more research. I found this paragraph
in MSDN with an article titled New in the DDK for Windows XP:

"A number of important changes have been made to the Windows DDK build
environment. For one, the Windows DDK now includes a complete set of
tools for building drivers. Microsoft® Visual C++® is no longer required
to be installed to use the DDK. Use of the included tools for all
Windows 2000 and Windows XP drivers is expected within the shipping
build environment. This version of the Windows DDK does not support
building Windows XP or Windows 2000 drivers using a version of Microsoft
Visual C++ earlier than the one supplied with the DDK. Attempts to use
an incorrect version of Visual C++ will result in the following error
message from the compiler:

error C1189: #error : Compiler version not supported by Windows DDK
This requirement is due to the reliance on many new features within this
tool set for proper functioning of the include build environment. The
compiler, linker, and supporting files, such as C Run-Times (CRTs),
should be considered an atomic unit within the build environment. It is
likely that mixing the supporting tool files of Visual C++ versions 5 or
6 with those in this DDK release, which are based on the new Visual C++
version 7 code base, will result in errors in the binaries. Using the
provided build environment and build tools is thus strongly recommended
to ensure generation of valid binaries."

It's unfortunate that Microsoft no longer allow you to use Visual Studio
to build the device drivers, at least they try to make it difficult. I
had all my projects set up to compile under Visual Studio, I will make
an attempt to change my VS build lines. Since I have never done this
before, should I change it in the project file where: CPP=cl.exe to
build.exe or do it in the custom build. What about the linker?

Thanks again for the pointers.

Linda





Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by David

David
Tue Feb 03 19:35:02 CST 2004

Did you try a Google search on 'DDKBUILD'? If so, why the questions
below. If not, try it. I don't use it because I detest using Visual
Studio for drivers. I use CodeWright and even use it with applications
that I build using Visual Studio. When Microsoft eliminated Brief
emulation for Visual Studio, my decision became real obvious and simple.

"Linda Yang" <hyang@signalogic.com> wrote in message
news:XmXTb.614$y55.225118420@newssvr11.news.prodigy.com...
> Gary G. Little wrote:
>
> > You should have the latest DDK installed. That includes the
"blessed"
> > compiler and tools for driver development. You will have wither
manually set
> > your executable paths in Visual Studio to the path of the WinDDK
3790
> > compiler, or download DDKBUILD and change your VS build lines to use
> > DDKBUILD. The latter is by far the least painful and the recommended
route.
> >
>
> Thanks for replying. I did some more research. I found this
paragraph
> in MSDN with an article titled New in the DDK for Windows XP:
>
> "A number of important changes have been made to the Windows DDK build
> environment. For one, the Windows DDK now includes a complete set of
> tools for building drivers. Microsoft® Visual C++® is no longer
required
> to be installed to use the DDK. Use of the included tools for all
> Windows 2000 and Windows XP drivers is expected within the shipping
> build environment. This version of the Windows DDK does not support
> building Windows XP or Windows 2000 drivers using a version of
Microsoft
> Visual C++ earlier than the one supplied with the DDK. Attempts to use
> an incorrect version of Visual C++ will result in the following error
> message from the compiler:
>
> error C1189: #error : Compiler version not supported by Windows DDK
> This requirement is due to the reliance on many new features within
this
> tool set for proper functioning of the include build environment. The
> compiler, linker, and supporting files, such as C Run-Times (CRTs),
> should be considered an atomic unit within the build environment. It
is
> likely that mixing the supporting tool files of Visual C++ versions 5
or
> 6 with those in this DDK release, which are based on the new Visual
C++
> version 7 code base, will result in errors in the binaries. Using the
> provided build environment and build tools is thus strongly
recommended
> to ensure generation of valid binaries."
>
> It's unfortunate that Microsoft no longer allow you to use Visual
Studio
> to build the device drivers, at least they try to make it difficult.
I
> had all my projects set up to compile under Visual Studio, I will make
> an attempt to change my VS build lines. Since I have never done this
> before, should I change it in the project file where: CPP=cl.exe to
> build.exe or do it in the custom build. What about the linker?
>
> Thanks again for the pointers.
>
> Linda
>
>
>
>



Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by Maxim

Maxim
Tue Feb 03 19:56:15 CST 2004

> Studio for drivers. I use CodeWright and even use it with applications
> that I build using Visual Studio.

Then why build using Visual Studio? DDK's BUILD can build user-mode apps too,
and WinDbg is by far better debugger then MSVC's (MSVC's is a subdeveloped
entry-level WinDbg).

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by David

David
Tue Feb 03 20:02:32 CST 2004

When I have to do applications, I find the incremental compiling during
debugging useful. WinDbg doesn't do that. The single-step is very
useful and it is very easy to backup and fix and have it do a quick fix
without having to restart from the beginning. The build utility doesn't
support the SDK in the same way as Visual Studio does, so that is
another problem. It is difficult sometimes to use Visual Studio to
compile some of the storage stuff since the headers with the DDK and SDK
are incompatible. You can get it to work, but a beginner will have
problems.

"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:ufkIVHs6DHA.2412@TK2MSFTNGP09.phx.gbl...
> > Studio for drivers. I use CodeWright and even use it with
applications
> > that I build using Visual Studio.
>
> Then why build using Visual Studio? DDK's BUILD can build user-mode
apps too,
> and WinDbg is by far better debugger then MSVC's (MSVC's is a
subdeveloped
> entry-level WinDbg).
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>



Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by Mark

Mark
Tue Feb 03 19:27:15 CST 2004

On Wed, 04 Feb 2004 00:52:07 GMT, Linda Yang <hyang@signalogic.com>
wrote:

>Gary G. Little wrote:
>
>> You should have the latest DDK installed. That includes the "blessed"
>> compiler and tools for driver development. You will have wither manually set
>> your executable paths in Visual Studio to the path of the WinDDK 3790
>> compiler, or download DDKBUILD and change your VS build lines to use
>> DDKBUILD. The latter is by far the least painful and the recommended route.
>>
>
>Thanks for replying. I did some more research. I found this paragraph
>in MSDN with an article titled New in the DDK for Windows XP:
>
>"A number of important changes have been made to the Windows DDK build
>environment. For one, the Windows DDK now includes a complete set of
>tools for building drivers. Microsoft® Visual C++® is no longer required
>to be installed to use the DDK. Use of the included tools for all
>Windows 2000 and Windows XP drivers is expected within the shipping
>build environment. This version of the Windows DDK does not support
>building Windows XP or Windows 2000 drivers using a version of Microsoft
>Visual C++ earlier than the one supplied with the DDK. Attempts to use
>an incorrect version of Visual C++ will result in the following error
>message from the compiler:
>
>error C1189: #error : Compiler version not supported by Windows DDK
>This requirement is due to the reliance on many new features within this
>tool set for proper functioning of the include build environment. The
>compiler, linker, and supporting files, such as C Run-Times (CRTs),
>should be considered an atomic unit within the build environment. It is
>likely that mixing the supporting tool files of Visual C++ versions 5 or
>6 with those in this DDK release, which are based on the new Visual C++
>version 7 code base, will result in errors in the binaries. Using the
>provided build environment and build tools is thus strongly recommended
>to ensure generation of valid binaries."
>
>It's unfortunate that Microsoft no longer allow you to use Visual Studio
>to build the device drivers, at least they try to make it difficult. I
>had all my projects set up to compile under Visual Studio, I will make
>an attempt to change my VS build lines. Since I have never done this
>before, should I change it in the project file where: CPP=cl.exe to
>build.exe or do it in the custom build. What about the linker?
>
>Thanks again for the pointers.
>
>Linda
>
Microsoft did not intentionally set out to make it impossible to use
Visual Studio, why would they do that? VS is a huge revenue stream for
them. What they set out to do was to distribute, with each release of
the ddk, the complete (well almost complete) set of compilation tools
qualified to correctly build drivers. This is a huge improvement over
the previous situation, which had developers world-wide using 'some
version or other' of 'some compiler or other' to generate something
that might be more or less binary compatible with the target OS
execution environment.

You can still use the VS6 or VS7 IDE. You can fix up your current
projects, which it seems directly invoke the compilation tools, or you
can use the method that I (and probably others as well) developed
years ago to address the no IDE support issue, referred to by Mr.
Little as the DDKBUILD method. See my website for detailed
instructions www.hollistech.com and free download of the shell script.





=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with by Linda

Linda
Thu Feb 05 20:20:02 CST 2004

Mark,

Thanks for the DDKBuild utility. I am trying out your DDKbuild utility.
I guess I was spoiled by visual studio where I can put Preprocessor
Definition in the project properties. I have a few defines in there
that I need for compilation because this cold runs on several platforms.
How do I do create these defines?

Same question also applies even with DDK build.exe utility, how do I do
preprocessor defines.

Linda

Mark Roddy wrote:
> On Wed, 04 Feb 2004 00:52:07 GMT, Linda Yang <hyang@signalogic.com>
> wrote:
>
>
>>Gary G. Little wrote:
>>
>>
>>>You should have the latest DDK installed. That includes the "blessed"
>>>compiler and tools for driver development. You will have wither manually set
>>>your executable paths in Visual Studio to the path of the WinDDK 3790
>>>compiler, or download DDKBUILD and change your VS build lines to use
>>>DDKBUILD. The latter is by far the least painful and the recommended route.
>>>
>>
>>Thanks for replying. I did some more research. I found this paragraph
>>in MSDN with an article titled New in the DDK for Windows XP:
>>
>>"A number of important changes have been made to the Windows DDK build
>>environment. For one, the Windows DDK now includes a complete set of
>>tools for building drivers. Microsoft® Visual C++® is no longer required
>>to be installed to use the DDK. Use of the included tools for all
>>Windows 2000 and Windows XP drivers is expected within the shipping
>>build environment. This version of the Windows DDK does not support
>>building Windows XP or Windows 2000 drivers using a version of Microsoft
>>Visual C++ earlier than the one supplied with the DDK. Attempts to use
>>an incorrect version of Visual C++ will result in the following error
>>message from the compiler:
>>
>>error C1189: #error : Compiler version not supported by Windows DDK
>>This requirement is due to the reliance on many new features within this
>>tool set for proper functioning of the include build environment. The
>>compiler, linker, and supporting files, such as C Run-Times (CRTs),
>>should be considered an atomic unit within the build environment. It is
>>likely that mixing the supporting tool files of Visual C++ versions 5 or
>>6 with those in this DDK release, which are based on the new Visual C++
>>version 7 code base, will result in errors in the binaries. Using the
>>provided build environment and build tools is thus strongly recommended
>>to ensure generation of valid binaries."
>>
>>It's unfortunate that Microsoft no longer allow you to use Visual Studio
>>to build the device drivers, at least they try to make it difficult. I
>>had all my projects set up to compile under Visual Studio, I will make
>>an attempt to change my VS build lines. Since I have never done this
>>before, should I change it in the project file where: CPP=cl.exe to
>>build.exe or do it in the custom build. What about the linker?
>>
>>Thanks again for the pointers.
>>
>>Linda
>>
>
> Microsoft did not intentionally set out to make it impossible to use
> Visual Studio, why would they do that? VS is a huge revenue stream for
> them. What they set out to do was to distribute, with each release of
> the ddk, the complete (well almost complete) set of compilation tools
> qualified to correctly build drivers. This is a huge improvement over
> the previous situation, which had developers world-wide using 'some
> version or other' of 'some compiler or other' to generate something
> that might be more or less binary compatible with the target OS
> execution environment.
>
> You can still use the VS6 or VS7 IDE. You can fix up your current
> projects, which it seems directly invoke the compilation tools, or you
> can use the method that I (and probably others as well) developed
> years ago to address the no IDE support issue, referred to by Mr.
> Little as the DDKBUILD method. See my website for detailed
> instructions www.hollistech.com and free download of the shell script.
>
>
>
>
>
> =====================
> Mark Roddy
> Windows .NET/XP/2000 Consulting
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com


Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by Phil

Phil
Thu Feb 05 23:26:15 CST 2004

"Linda Yang" <hyang@signalogic.com> wrote in message
news:mRCUb.39$mU1.14970920@newssvr11.news.prodigy.com...
> Mark,
>
> Thanks for the DDKBuild utility. I am trying out your DDKbuild utility.
> I guess I was spoiled by visual studio where I can put Preprocessor
> Definition in the project properties. I have a few defines in there
> that I need for compilation because this cold runs on several platforms.
> How do I do create these defines?
>
> Same question also applies even with DDK build.exe utility, how do I do
> preprocessor defines.

In your sources file, set USER_C_FLAGS & or C_DEFINES as necessary based on
the build environment you invoked with DDKBuild. You can do a lot of
conditional stuff in the sources file.

Phil
--
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.



Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by shailwx

shailwx
Fri Feb 13 10:38:40 CST 2004

Hey,

i am a newbie getting the same error in my Application.

in my application i am trying to include ntddk.h it gives the error
fatal error C1189: #error : Compiler version not supported by Windows
DDK Error executing cl.exe.

what to do now i am just including this file to use IO_CTL command in
my app to find out the disk controller number.

thanks in advance
Shail

"Phil Barila" <PBarila@Barila.com> wrote in message news:<w6OdnfFJytDquL7dRVn-uQ@4dv.net>...
> "Linda Yang" <hyang@signalogic.com> wrote in message
> news:mRCUb.39$mU1.14970920@newssvr11.news.prodigy.com...
> > Mark,
> >
> > Thanks for the DDKBuild utility. I am trying out your DDKbuild utility.
> > I guess I was spoiled by visual studio where I can put Preprocessor
> > Definition in the project properties. I have a few defines in there
> > that I need for compilation because this cold runs on several platforms.
> > How do I do create these defines?
> >
> > Same question also applies even with DDK build.exe utility, how do I do
> > preprocessor defines.
>
> In your sources file, set USER_C_FLAGS & or C_DEFINES as necessary based on
> the build environment you invoked with DDKBuild. You can do a lot of
> conditional stuff in the sources file.
>
> Phil

Re: Win DDK 3790 cannot compile with VS 6.0, but linking error with VS. NET by Maxim

Maxim
Fri Feb 13 10:50:01 CST 2004

Use the compiler provided with the DDK, and not one provided with MSVC.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Chaps" <shailwx@yahoo.com> wrote in message
news:51e59483.0402130838.63318bd1@posting.google.com...
> Hey,
>
> i am a newbie getting the same error in my Application.
>
> in my application i am trying to include ntddk.h it gives the error
> fatal error C1189: #error : Compiler version not supported by Windows
> DDK Error executing cl.exe.
>
> what to do now i am just including this file to use IO_CTL command in
> my app to find out the disk controller number.
>
> thanks in advance
> Shail
>
> "Phil Barila" <PBarila@Barila.com> wrote in message
news:<w6OdnfFJytDquL7dRVn-uQ@4dv.net>...
> > "Linda Yang" <hyang@signalogic.com> wrote in message
> > news:mRCUb.39$mU1.14970920@newssvr11.news.prodigy.com...
> > > Mark,
> > >
> > > Thanks for the DDKBuild utility. I am trying out your DDKbuild utility.
> > > I guess I was spoiled by visual studio where I can put Preprocessor
> > > Definition in the project properties. I have a few defines in there
> > > that I need for compilation because this cold runs on several platforms.
> > > How do I do create these defines?
> > >
> > > Same question also applies even with DDK build.exe utility, how do I do
> > > preprocessor defines.
> >
> > In your sources file, set USER_C_FLAGS & or C_DEFINES as necessary based on
> > the build environment you invoked with DDKBuild. You can do a lot of
> > conditional stuff in the sources file.
> >
> > Phil