MarkinAustin
Programmer
I am playing with the NT/2K Device Driver Kit with Visual C++ 6.0. I am
trying to use some of the Zw- functions along with the C++ iostream and
string libraries and I am having problems. Has anyone else encountered
problems trying to do this? Here is a simple program and the link errors
that follow --
--- Begin test.cpp ---
#pragma comment(lib, "ntdll.lib"
#include
#include
#include
using namespace std;
int main(void) {
string s("hello"
return 0;
}
--- End test.cpp ---
Errors:
LIBC.lib(exsup.obj) : error LNK2005: __global_unwind2 already defined in
ntdll.lib(exsup.obj)
LIBC.lib(exsup.obj) : error LNK2005: __local_unwind2 already defined in
ntdll.lib(exsup.obj)
LIBC.lib(exsup.obj) : error LNK2005: __abnormal_termination already
defined in ntdll.lib(exsup.obj)
Release/test.exe : fatal error LNK1169: one or more multiply defined
symbols found
I have tried ordering the includes and pragmas differently. I also tried
different versions of ntdll.lib. Could this be an issue where I need to
dynamically bind to ntdll.dll (as in LoadLibrary("ntdll.dll"?
trying to use some of the Zw- functions along with the C++ iostream and
string libraries and I am having problems. Has anyone else encountered
problems trying to do this? Here is a simple program and the link errors
that follow --
--- Begin test.cpp ---
#pragma comment(lib, "ntdll.lib"
#include
#include
#include
using namespace std;
int main(void) {
string s("hello"
return 0;
}
--- End test.cpp ---
Errors:
LIBC.lib(exsup.obj) : error LNK2005: __global_unwind2 already defined in
ntdll.lib(exsup.obj)
LIBC.lib(exsup.obj) : error LNK2005: __local_unwind2 already defined in
ntdll.lib(exsup.obj)
LIBC.lib(exsup.obj) : error LNK2005: __abnormal_termination already
defined in ntdll.lib(exsup.obj)
Release/test.exe : fatal error LNK1169: one or more multiply defined
symbols found
I have tried ordering the includes and pragmas differently. I also tried
different versions of ntdll.lib. Could this be an issue where I need to
dynamically bind to ntdll.dll (as in LoadLibrary("ntdll.dll"?