Hello everyone,
I have written a program to get information about device
drivers using the windows ddk, but when I try to compile
it, I get the following linker error:
main.obj : error LNK2019: unresolved external symbol
“public: __thiscall std::ios_base::Init::Init(void)”
(??xxxxx@xxxxx@std@@QAE@XZ) referenced in function $E1
main.obj : error LNK2019: unresolved external symbol
“public: __thiscall std::ios_base::Init::~Init(void)”
(??xxxxx@xxxxx@std@@QAE@XZ) referenced in function $E2
main.obj : error LNK2019: unresolved external symbol
"public: __thiscall std::Winit::Winit(void)"
(??xxxxx@std@@QAE@XZ) referenced in function $E4
main.obj : error LNK2019: unresolved external symbol
"public: __thiscall std::Winit::~Winit(void)"
(??xxxxx@std@@QAE@XZ) referenced in function $E5
main.obj : error LNK2001: unresolved external symbol
“class std::basic_ostreamstd::char_traits > std::cout”
(?xxxxx@std@@3V?$basic_ostream@DU?$xxxxx@xxxxx@std@@@1@A)
main.obj : error LNK2019: unresolved external symbol "void
__stdcall HidD_GetHidGuid(struct GUID *)"
(?HidD_GetHidGuid@@YGXPAU_GUID@@@Z) referenced in function
main
main.obj : error LNK2019: unresolved external symbol
“public: void__thiscall std::ios_base::clear(int,bool)”
(?xxxxx@xxxxx@std@@QAEXH_N@Z) referenced in function
“public: void __thiscall std::basic_iosstd::char_traits >::clear(int,bool)”
(?clear@?$basic_ios@DU?$xxxxx@xxxxx@std@@@std@@QAEXH_N@Z)
main.obj : error LNK2019: unresolved external symbol “bool
__cdecl std::uncaught_exception(void)”
(?xxxxx@std@@YA_NXZ) referenced in function
“public: __thiscall std::basic_ostreamstd::char_traits >::sentry::~sentry(void)”
(??1sentry@?$basic_ostream@DU?$xxxxx@xxxxx@std@@@std@@QAE@XZ)
objchk_wxp_x86\i386\usbinfo.exe : error LNK1120: 8
unresolved externals
Does anybody on the list know how I could fix this, please
?
Scott Brown
________________________
Do You Yahoo!?
Upgrade Your Life
http://bb.yahoo.co.jp/
You need to #include hidsdi.h like this
extern “C” {
#include “hidsdi.h”
}
For the std:: errors, it looks like you are not specifying that you want
to link against the msvcrt, try use_msvrt=1 in your sources file
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ??? ???
Sent: Tuesday, April 12, 2005 1:29 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] linker error while using ddk xp sp1
Hello everyone,
I have written a program to get information about device
drivers using the windows ddk, but when I try to compile
it, I get the following linker error:
main.obj : error LNK2019: unresolved external symbol
“public: __thiscall std::ios_base::Init::Init(void)”
(??xxxxx@xxxxx@std@@QAE@XZ) referenced in function $E1
main.obj : error LNK2019: unresolved external symbol
“public: __thiscall std::ios_base::Init::~Init(void)”
(??xxxxx@xxxxx@std@@QAE@XZ) referenced in function $E2
main.obj : error LNK2019: unresolved external symbol
"public: __thiscall std::Winit::Winit(void)"
(??xxxxx@std@@QAE@XZ) referenced in function $E4
main.obj : error LNK2019: unresolved external symbol
"public: __thiscall std::Winit::~Winit(void)"
(??xxxxx@std@@QAE@XZ) referenced in function $E5
main.obj : error LNK2001: unresolved external symbol
“class std::basic_ostreamstd::char_traits > std::cout”
(?xxxxx@std@@3V?$basic_ostream@DU?$xxxxx@xxxxx@std@@@1@A)
main.obj : error LNK2019: unresolved external symbol "void
__stdcall HidD_GetHidGuid(struct GUID *)"
(?HidD_GetHidGuid@@YGXPAU_GUID@@@Z) referenced in function
main
main.obj : error LNK2019: unresolved external symbol
“public: void__thiscall std::ios_base::clear(int,bool)”
(?xxxxx@xxxxx@std@@QAEXH_N@Z) referenced in function
“public: void __thiscall std::basic_iosstd::char_traits >::clear(int,bool)”
(?clear@?$basic_ios@DU?$xxxxx@xxxxx@std@@@std@@QAEXH_N@Z)
main.obj : error LNK2019: unresolved external symbol “bool
__cdecl std::uncaught_exception(void)”
(?xxxxx@std@@YA_NXZ) referenced in function
“public: __thiscall std::basic_ostreamstd::char_traits >::sentry::~sentry(void)”
(??1sentry@?$basic_ostream@DU?$xxxxx@xxxxx@std@@@std@@QAE@XZ)
objchk_wxp_x86\i386\usbinfo.exe : error LNK1120: 8
unresolved externals
Does anybody on the list know how I could fix this, please
?
Scott Brown
________________________
Do You Yahoo!?
Upgrade Your Life
http://bb.yahoo.co.jp/
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com