Home › Forums › Discussions › Support › problem with MS visual c++ linking
- This topic has 4 replies, 3 voices, and was last updated 20 years, 2 months ago by Wyatt.
-
AuthorPosts
-
September 2, 2004 at 5:33 pm #4871
Anyone,
I tried to compile the source in the MSVC directory of the trial version and I’m getting a linker mismatch problem. output from MSVC compiler is below:
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __thiscall CNdisApi::CNdisApi(char const *)” (__imp_??0CNdisApi@@QAE@PBD@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: virtual __thiscall CNdisApi::~CNdisApi(void)” (__imp_??1CNdisApi@@UAE@XZ)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::FlushAdapterPacketQueue(void *)” (__imp_?FlushAdapterPacketQueue@CNdisApi@@QAEHPAX@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::SetAdapterMode(struct _ADAPTER_MODE *)” (__imp_?SetAdapterMode@CNdisApi@@QAEHPAU_ADAPTER_MODE@@@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::SetPacketEvent(void *,void *)” (__imp_?SetPacketEvent@CNdisApi@@QAEHPAX0@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::SendPacketToMstcp(struct _ETH_REQUEST *)” (__imp_?SendPacketToMstcp@CNdisApi@@QAEHPAU_ETH_REQUEST@@@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::SendPacketToAdapter(struct _ETH_REQUEST *)” (__imp_?SendPacketToAdapter@CNdisApi@@QAEHPAU_ETH_REQUEST@@@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::ReadPacket(struct _ETH_REQUEST *)” (__imp_?ReadPacket@CNdisApi@@QAEHPAU_ETH_REQUEST@@@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::GetTcpipBoundAdaptersInfo(struct _TCP_AdapterList *)” (__imp_?GetTcpipBoundAdaptersInfo@CNdisApi@@QAEHPAU_TCP_AdapterList@@@Z)
PassThru.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __thiscall CNdisApi::IsDriverLoaded(void)” (__imp_?IsDriverLoaded@CNdisApi@@QAEHXZ)
Debug/PassThru.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.PassThru.exe – 11 error(s), 0 warning(s)
Does anyone know what’s missing/wrong? Thank you already.
September 6, 2004 at 9:31 am #5620make sure that you have following lib files
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
September 29, 2004 at 11:28 pm #5621I verified that my computer does have all those libraries. However upon further look, I determined that there were function prototypes for NDisApi functions like “ReadPacket” but not function definitions. I wrote to Serpentfly and he told me that the definitions were in ndisapi.dll. Most of the folders (bin/Cbuilder/kernel) have a ndisapi.dll file in them but the MSVC folder does not. So I copied ndisapi.dll into the MSVC folder (still trying to get the MSVC version to compile) and added an include statement on ndisapi.h to include the ndisapi.dll. Unfortunately this gave me different errors, however the original problem of the “unresolved external symbols” is gone. How should the program link to ndisapi.dll? I’ll review the other folders/files and maybe I can figure it out.
September 30, 2004 at 11:12 am #5622You should link ndisapi.lib.
September 30, 2004 at 5:36 pm #5623Thank you Serpent Fly. I had to link to ndisapi.lib and then add ndisapi.dll to my path (I chose inside the projects debug folder). She is running, and that is a relief.
-
AuthorPosts
- You must be logged in to reply to this topic.