Ok, I should pay more attention before I jump in. I am not really up to
date on what all is happening with printer drivers as they vacillate between
UM, KM, back to UM, and who all knows what next. So I can see where the use
of LIBCNTPR could get confused. It may well be a KM library. No clue at
this point.
And I should read the DOCs instead of just MAKEFILE.NEW. The DOC clearly
say that setting USE_LIBCNTPR=1 enables ?kernel run-time libraries?.
So, ignore the network guy. He should know better and now he does.
Appologies all.
Dave Cattley
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Sunday, September 26, 2010 10:03 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DDK Linker error question
AFAIK LIBCNTPR is a usermode library only. That is likely why you felt
it necessary to add both
USE_LIBCNTPR=1
-and-
TARGETLIBS=$(DDK_LIB_PATH)\libcntpr.lib
because you added the USE_… and nothing happened ? which was correct.
So, why do you want to use functions that you think you can get from
LIBCNTPR in a kernel mode module? And what are you trying to accomplish?
Maybe we can help you with that directly.
Good Luck,
Dave Cattley
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Brodie
Sent: Sunday, September 26, 2010 7:38 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] DDK Linker error question
Hello,
I have been trying to get a simple driver with some standard string
processing functions to compile, but I am running into linker errors. From
what I could gather most of the string processing functions I need are in
libcntpr.lib and that I should link with that. When I compile I get the
following linker errors (cleaned up the paths):
1>…\win32k\libcntpr.lib(_ctype.obj) : error LNK2005: _isupper already
defined in ntoskrnl.lib(ntoskrnl.exe)
1>…\win32k\libcntpr.lib(_ctype.obj) : error LNK2005: _islower already
defined in ntoskrnl.lib(ntoskrnl.exe)
1>…\win32k\libcntpr.lib(_ctype.obj) : error LNK2005: _isdigit already
defined in ntoskrnl.lib(ntoskrnl.exe)
1>…\win32k\libcntpr.lib(_ctype.obj) : error LNK2005: _isxdigit already
defined in ntoskrnl.lib(ntoskrnl.exe)
1>…\win32k\libcntpr.lib(_ctype.obj) : error LNK2005: _isspace already
defined in ntoskrnl.lib(ntoskrnl.exe)
My sources file is as follows:
TARGETNAME=SomeTest
TARGETPATH=obj
TARGETTYPE=DRIVER
USE_LIBCNTPR=1
TARGETLIBS=$(DDK_LIB_PATH)\libcntpr.lib
!IFNDEF MSC_WARNING_LEVEL
MSC_WARNING_LEVEL=/W3
!ENDIF
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
INCLUDES=…..;…..\includes;$(DDK_INC_PATH)
SOURCES=… # Long list of files…
Someone mentioned somewhere that this could be due to the order of the
include’s of the headers, but as unlikely as that seemed to me I tried it
and it didn’t work. When I change the TARGETTYPE to be a GDI_DRIVER
everything is nice and dandy, but I do need ntoskrnl.
Thanks,
Daniel
— 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
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