Cannot use lib files

Hello

I can use my lib file in an application project. But I can’t use it in
winddk project(like sfilter project). Do you know why?

I use GLib. I use the function g_slist_append(). But the linker can not find
it in the glib-2.0.lib. It said “unresolved external symbol
xxxxx@8 referenced in function _DriverEntry@8” But in my
application project (like Win32 Console Project), the linker can find it.

Thank you very much!

cxun

陈勋 wrote:

I can use my lib file in an application project. But I can’t use it in
winddk project(like sfilter project). Do you know why?

I use GLib. I use the function g_slist_append(). But the linker can
not find it in the glib-2.0.lib. It said “unresolved external symbol
xxxxx@8 referenced in function _DriverEntry@8” But in my
application project (like Win32 Console Project), the linker can find it.

I can think of two possibilities. One, you have not specified the path
to the library correctly in your “sources” file. Two, you have a
calling convention confusion. In your include file, do you explicitly
declare the functions as __stdcall or __cdecl?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

You can not use user mode libraries in a driver. I believe glib-2.0.lib is
for GTK+.

You can adapt SOME user mode library source code for use in a driver.

Jan

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ??
Sent: Friday, October 10, 2008 12:39 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Cannot use lib files

Hello

I can use my lib file in an application project. But I can’t
use it in winddk project(like sfilter project). Do you know why?

I use GLib. I use the function g_slist_append(). But the
linker can not find it in the glib-2.0.lib. It said
“unresolved external symbol
xxxxx@8 referenced in function _DriverEntry@8” But
in my application project (like Win32 Console Project), the
linker can find it.

Thank you very much!

cxun

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3513 (20081010) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

oh i see. thank you very much!


From: “Jan Bottorff”
Sent: Saturday, October 11, 2008 6:57 AM
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Cannot use lib files

> You can not use user mode libraries in a driver. I believe glib-2.0.lib is
> for GTK+.
>
> You can adapt SOME user mode library source code for use in a driver.
>
> Jan
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of ??
>> Sent: Friday, October 10, 2008 12:39 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] Cannot use lib files
>>
>> Hello
>>
>> I can use my lib file in an application project. But I can’t
>> use it in winddk project(like sfilter project). Do you know why?
>>
>> I use GLib. I use the function g_slist_append(). But the
>> linker can not find it in the glib-2.0.lib. It said
>> “unresolved external symbol
>> xxxxx@8 referenced in function _DriverEntry@8” But
>> in my application project (like Win32 Console Project), the
>> linker can find it.
>>
>> Thank you very much!
>>
>> cxun
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3513 (20081010)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> —
> 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
>