|
I created a new Win32 Dynamic-Link Library project and added the most basic framework code (test.cpp). Everything is fine.
I need to reference the files of the jrtplib library in the project. The operation is as follows:
Added jthread.lib jrtplib.lib (two required libraries) in project | Settings | Link;
Created a new CRtp class to specifically operate jrtplib related functions;
Added the most basic framework code in CRtp; (if it is an exe project, there is no problem at all)
Then include rtp.h in test.cpp ...
rtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: char const * __thiscall std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char> > :: c_str (void) const "(__imp_? c_
str @? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ QBEPBDXZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: unsigned int __thiscall std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> :: length (void) const "(__imp_? l
ength @? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ QBEIXZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: static unsigned int const std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char> > :: npos "(__imp_? npos @? $ basic_
string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ 2IB)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: unsigned int __thiscall std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> :: find (char, unsigned int) const
"(__imp_? find @? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ QBEIDI @ Z)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> :: ~ basic_string <char, struct std :: char_traits
<char>, class std :: allocator <char>> (void) "(__imp _ ?? 1? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ QAE @XZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) bool __cdecl std :: operator == (class std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> const&, class std :: basic_st
ring <char, struct std :: char_traits <char>, class std :: allocator <char>> const&) "(__imp _ ?? 8std @@ YA_NABV? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ 0 @ 0 @ Z)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> :: basic_string <char, struct std :: char_traits <
char>, class std :: allocator <char>> (char const *, class std :: allocator <char> const&) "(__imp _ ?? 0? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ QAE @ PBDABV? $ allocator @ D @ 1 @@ Z)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: ios_base :: Init :: Init (void)" (__imp _ ?? 0Init @ ios_base @ std @@ QAE @@ XZ)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: ios_base :: Init :: Init (void)" (__imp _ ?? 0Init @ ios_base @ std @@ QAE @ XZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: ios_base :: Init :: ~ Init (void)" (__imp _ ?? 1Init @ ios_base @ std @@ QAE @XZ)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: ios_base :: Init :: ~ Init (void)" (__imp _ ?? 1Init @ ios_base @ std @@ QAE @XZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: _ Winit :: _ Winit (void)" (__imp _ ?? 0_Winit @ std @@ QAE @ XZ)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: _ Winit :: _ Winit (void)" (__imp _ ?? 0_Winit @ std @@ QAE @ XZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: _ Winit :: ~ _Winit (void)" (__imp _ ?? 1_Winit @ std @@ QAE @ XZ)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: _ Winit :: ~ _Winit (void)" (__imp _ ?? 1_Winit @ std @@ QAE @ XZ)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) bool __cdecl std :: operator <(class std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> const&, class std :: basic_str
ing <char, struct std :: char_traits <char>, class std :: allocator <char>> const&) "(__imp _ ?? Mstd @@ YA_NABV? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ 0 @ 0 @ Z)
jrtplibd.lib (rtpudpv4transmitter.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: __thiscall std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> :: basic_string <char, struct std :: char_traits <
char>, class std :: allocator <char>> (class std :: basic_string <char, struct std :: char_traits <char>, class std :: allocator <char>> const&) "(__imp _ ?? 0? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ std @@ QAE @ ABV01 @@ Z)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) public: class std :: basic_ostream <char, struct std :: char_traits <char>>&__thiscall std :: basic_ostream <char, struct std :: char_traits <char>> :: operator <<
(class std :: basic_ostream <char, struct std :: char_traits <char>>&(__cdecl *) (class std :: basic_ostream <char, struct std :: char_traits <char>>&)) "(__imp _ ?? 6 ? $ basic_ostream @ DU? $ char_traits @ D @ std @@@ std @@ QAEAAV01 @ P6AAAV01 @ AAV01 @@ Z @ Z)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) class std :: basic_ostream <char, struct std :: char_traits <char>>&__cdecl std :: operator << (class std ::: basic_ostream <char, struct std :: char_traits <char>>
&, char const *) "(__imp _ ?? 6std @@ YAAAV? $ Basic_ostream @ DU? $ Char_traits @ D @ std @@@ 0 @ AAV10 @ PBD @ Z)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) class std :: basic_ostream <char, struct std :: char_traits <char>> std :: cerr" (__imp_? cerr @ std @@ 3V? $ Basic_ostream @ DU? $ Char_traits @ D @ std @@@ 1 @ A)
jrtplibd.lib (rtppollthread.obj): error LNK2001: unresolved external symbol "__declspec (dllimport) class std :: basic_ostream <char, struct std :: char_traits <char>>&__cdecl std :: endl (class std :: basic_ostream < char, struct std :: char_traits <char>>&) "(_
_imp_? endl @ std @@ YAAAV? $ basic_ostream @ DU? $ char_traits @ D @ std @@@ 1 @ AAV21 @@ Z)
Debug / testlib.ax: fatal error LNK1120: 17 unresolved externals
How can I solve this? Thank you
---------------------------------------------------------
Other clues reference:
Because this Dll development needs, Ignore all default libraries is selected in the Project | Settings | C / C ++ | Calling convention selection __stdcall. Settings | Link. If you do not select this, another link error occurs:
LIBCMTD.lib (dbgheap.obj): error LNK2015: __malloc_dbg already defined in msvcrtd.lib (MSVCRTD.dll)
LIBCMTD.lib (dbgheap.obj): error LNK2015: __free_dbg already defined in msvcrtd.lib (MSVCRTD.dll)
LIBCMTD.lib (crt0init.obj): error LNK2015: ___xc_z already defined in msvcrtd.lib (cinitexe.obj)
LIBCMTD.lib (crt0init.obj): error LNK2015: ___xc_a already defined in msvcrtd.lib (cinitexe.obj) ... |
|