Problem linking with NTDLL.LIB

Hi All,
In a Console Application, when I’m linking with
ntdll.lib, getting a linker error like the foll.

LIBCD.lib(chkstk.obj) : error LNK2005: __chkstk
already defined in ntdll.lib(ntdll.dll)

This happens only when I take more than 4K of stack
space. I’ve tried using #pragma check_stack(off) and
/Gs with the same result.

Any thoughts on how to avoid this?

Thanks,
Sajeev.


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dear All

I have made a WDM Device Driver.
Yeh…It operated well…Good…

But the basical and essential problem is follow…

I wanna use some functions -[which is depicted in user made “Lib” file]- in my WDM Device Driver routine at PASSIVE_LEVEL, how can I inform to my compiler to recognize it…?

Shortly said, how can I include user specific “Lib” file in WDM…?

Anticipate your reply…

Best Regard
YunGun_Jeong
AceTronix in Seoul KOREA

[Á¤¿¬±Ù]-[YunGun_Jeong]

RTOS(RealTimeOperatingSystem) & Windows2000/NT Device Driver Develope
SoftPLC (ISaGRAF/PRO) Dev & Admin [personal : xxxxx@dreamwiz.com]

138-050
¼­¿ï½Ã ¼ÛÆı¸ ¹æÀ̵¿ 47-9 ÀÌ·¹·Î ºôµù 5Ãþ ¿¡À̽º Æ®·Î´Ð½º ±â¼ú¿¬±¸¼Ò
Irero Bldg 5F, 47-9 Bangi-Dong , SongPa-Gu, Seoul, KOREA (zip:138-050)

http://www.acetronix.co.kr [office : xxxxx@acetronix.co.kr]


DreamWiz Free Mail @ http://www.dreamwiz.com/
DreamSearch Click the world!!! http://search.dreamwiz.com/

>I wanna use some functions -[which is depicted in user made “Lib”

file]- in my WDM Device Driver routine at PASSIVE_LEVEL, how can I

This is usually impossible.
If your Lib functions reference practically any C runtime stuff or any
user-mode APIs - this IS impossible.
This is possible only if your Lib is a “thing in itself” and does not
reference any other modules - for instance, if this is the encryption,
compression or regexp-matching library which does not depend on any APIs.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You said “This is possible only if your Lib is a “thing in itself” and does not reference any other modules”…
At the case of that How can I handle it…?
Let me know

>I wanna use some functions -[which is depicted in user made “Lib”
>file]- in my WDM Device Driver routine at PASSIVE_LEVEL, how can I

This is usually impossible.
If your Lib functions reference practically any C runtime stuff or any
user-mode APIs - this IS impossible.
This is possible only if your Lib is a “thing in itself” and does not
reference any other modules - for instance, if this is the encryption,
compression or regexp-matching library which does not depend on any APIs.

Max


You are currently subscribed to ntdev as: xxxxx@dreamwiz.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Best Regard
YunGun_Jeong
AceTronix in Seoul KOREA

[Á¤¿¬±Ù]-[YunGun_Jeong]

RTOS(RealTimeOperatingSystem) & Windows2000/NT Device Driver Develope
SoftPLC (ISaGRAF/PRO) Dev & Admin [personal : xxxxx@dreamwiz.com]

138-050
¼­¿ï½Ã ¼ÛÆı¸ ¹æÀ̵¿ 47-9 ÀÌ·¹·Î ºôµù 5Ãþ ¿¡À̽º Æ®·Î´Ð½º ±â¼ú¿¬±¸¼Ò
Irero Bldg 5F, 47-9 Bangi-Dong , SongPa-Gu, Seoul, KOREA (zip:138-050)

http://www.acetronix.co.kr [office : xxxxx@acetronix.co.kr]


DreamWiz Free Mail @ http://www.dreamwiz.com/
DreamSearch Click the world!!! http://search.dreamwiz.com/

Add the path to your library to the TARGETLIBS variable in your
sources file. For example:

TARGETLIBS=C:\mylib\mylib.lib

will cause this library to be linked to the driver (at least this is the
case in Windows NT 4.0, haven’t tried it on Win2k).

Don Burn
NT Device Driver and Filesystem Consulting
----- Original Message -----
From: ???
To: NT Developers Interest List
Sent: Friday, December 15, 2000 5:20 AM
Subject: [ntdev] Re:Re: Lib

You said “This is possible only if your Lib is a “thing in itself” and does not reference any other modules”…
At the case of that How can I handle it…?
Let me know

>I wanna use some functions -[which is depicted in user made “Lib”
>>file]- in my WDM Device Driver routine at PASSIVE_LEVEL, how can I
>
>This is usually impossible.
>If your Lib functions reference practically any C runtime stuff or any
>user-mode APIs - this IS impossible.
>This is possible only if your Lib is a “thing in itself” and does not
>reference any other modules - for instance, if this is the encryption,
>compression or regexp-matching library which does not depend on any APIs.
>
> Max
>
>
>—
>You are currently subscribed to ntdev as: xxxxx@dreamwiz.com
>To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>

Best Regard
YunGun_Jeong
AceTronix in Seoul KOREA

[???]-[YunGun_Jeong]

RTOS(RealTimeOperatingSystem) & Windows2000/NT Device Driver Develope
SoftPLC (ISaGRAF/PRO) Dev & Admin [personal : xxxxx@dreamwiz.com]

138-050
??? ???ı? ???̵? 47-9 ?̷??? ??? 5?? ???̽? Ʈ?δн? ???
Irero Bldg 5F, 47-9 Bangi-Dong , SongPa-Gu, Seoul, KOREA (zip:138-050)

http://www.acetronix.co.kr [office : xxxxx@acetronix.co.kr]

Your life on the net

DreamWiz Free Mail @ http://www.dreamwiz.com/
DreamSearch Click the world!!! http://search.dreamwiz.com/


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>You said "This is possible only if your Lib is a “thing in itself”

and does not reference any other modules"…
At the case of that How can I handle it…?

Rewrite the Lib in order to get rid of any user-mode runtime functions like
printf(). Use only those of them which are supported in the kernel-mode.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>Add the path to your library to the TARGETLIBS variable in your

sources file. For example:
TARGETLIBS=C:\mylib\mylib.lib

I used CRTLIBS variable to do the same. All works OK.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com