Answered by:
Link error - std::locale::facet::_Register(void) when migrated the app from vc7 to vc9
Question
-
I am migrating my application from MSVS20003.Net to MSVS2008. My application is depending on the "Reuters SFC C++" thirdparty libs and got the below link errors. I am unable to resolve these errors. I am searched in google for the same and no use.
So please help me.
1>libsfc.lib(sslsnaprec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
1>libsfc.lib(rtrecsrvciter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
1>libsfc.lib(dfltrspl.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z)
1>libsfc.lib(dfltrtrs.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
1>libsfc.lib(sslrtrs.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
1>libsfc.lib(sslrtrec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
1>libsfc.lib(sslsnaprec.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z) referenced in function "public: __thiscall RTRSnapshotRecord::RTRSnapshotRecord(void)" (??0RTRSnapshotRecord@@QAE@XZ)
1>libsfc.lib(rtrecsrvciter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(dfltrspl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(dfltrtrs.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(sslrtrs.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(sslrtrec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(sslsnaprec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(rtrecsrvciter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(dfltrspl.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z) referenced in function "class std::ctype<unsigned short> const & __cdecl std::use_facet<class std::ctype<unsigned short> >(class std::locale const &)" (??$use_facet@V?$ctype@G@std@@@std@@YAABV?$ctype@G@0@ABVlocale@0@@Z)
1>libsfc.lib(dfltrtrs.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(sslrtrs.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(sslrtrec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
1>libsfc.lib(rtstring.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::ostrstream::ostrstream(char *,int,int)" (__imp_??0ostrstream@std@@QAE@PADHH@Z) referenced in function "public: class RTRString & __thiscall RTRString::fromNumeric(double)" (?fromNumeric@RTRString@@QAEAAV1@N@Z)
1>libsfc.lib(rtstring.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::ostrstream::~ostrstream(void)" (__imp_??1ostrstream@std@@UAE@XZ) referenced in function "public: void __thiscall std::ostrstream::`vbase destructor'(void)" (??_Dostrstream@std@@QAEXXZ)
1>libsfc.lib(ufdb.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::istrstream::~istrstream(void)" (__imp_??1istrstream@std@@UAE@XZ) referenced in function "public: void __thiscall std::istrstream::`vbase destructor'(void)" (??_Distrstream@std@@QAEXXZ)Friday, March 5, 2010 3:13 PM
Answers
-
Hi All,
I am unable to resolve the above std::locale::facet::_Register(void) link errors. So I got the latest Reuters SFC 4.5.6 C++ libs from the thirdparty (which is compiled in MSVS2008) and integrated to my application.
Initially I got the below compiler errors.
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(130) : error C2146: syntax error : missing ';' before identifier '_readSocketSet'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h (130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(133) : error C2079: 'RTRSelectNotifier::_timerExpirationTime' uses undefined struct 'timeval'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(138) : error C2061: syntax error : identifier 'fd_set'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(138) : error C2059: syntax error : ')'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(138) : error C2143: syntax error : missing ')' before ';'
Solution :-
I resolved them by using the either of the below approaches.
C:\DevLibs\Reuters\4.5.6\include\rtr\selectni.h
Added - #include <winsock2.h> for _Win32 Macro
OR
Add "x86_WindowsNT_5X " to the preprocessor list. (this is proper solution)
After that I got the below different link errors
>libsfc.lib(sslinterface.obj ) : error LNK2019: unresolved external symbol _DACS_CsLock referenced in function "public: static int __cdecl RTRSSLInterface::convertPermDataToLock(class RTRString const &,class RTRString const &,long,struct ssl_Access_Control *,int)" (?convertPermDataToLock@RTRSSLInterface@@SAHABVRTRString@@0JPAUssl_Access_Control@@H@Z)
1>libsfc.lib(sslinterface.obj) : error LNK2019: unresolved external symbol _DACS_perror referenced in function "public: static int __cdecl RTRSSLInterface::convertPermDataToLock(class RTRString const &,class RTRString const &,long,struct ssl_Access_Control *,int)" (?convertPermDataToLock@RTRSSLInterface@@SAHABVRTRString@@0JPAUssl_Access_Control@@H@Z)
1>libsfc.lib(sslinterface.obj) : error LNK2019: unresolved external symbol _DACS_GetLock refe renced in function "public: static int __cdecl RTRSSLInterface::convertPermDataToLock(class RTRString const &,class RTRString const &,long,struct ssl_Access_Control *,int)" (?convertPermDataToLock@RTRSSLInterface@@SAHABVRTRString@@0JPAUssl_Access_Control@@H@Z)
Solution:-
I resolved the above link errors by linking with dacs4w32.lib .
Now all compiler & link errors are resolved with the latest Reuters libs.
Once again thanks for every one who try to help me!
- Marked as answer by Lakshmana_1980 Tuesday, March 9, 2010 9:05 AM
Tuesday, March 9, 2010 9:04 AM
All replies
-
Please let me know how to solve the this link error std::locale::facet::_Register(void).
Is there any techniques/tips/tools/materials for getting full knowledge on fixing the link errors in C++
Monday, March 8, 2010 2:10 AM -
I am not getting the above link error with the VC7 compiler. Why VC9 compiler giving the above link error.Monday, March 8, 2010 3:34 AM
-
I guess this is caused by the CRT version mismatching, I'm not familiar with "Reuters SFC C++" thirdparty libs, you could ask the author for the VC9 version libs to take a try.
Sincerely,
Wesley
Please mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Monday, March 8, 2010 5:12 AM -
Hi All,
I am unable to resolve the above std::locale::facet::_Register(void) link errors. So I got the latest Reuters SFC 4.5.6 C++ libs from the thirdparty (which is compiled in MSVS2008) and integrated to my application.
Initially I got the below compiler errors.
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(130) : error C2146: syntax error : missing ';' before identifier '_readSocketSet'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h (130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(133) : error C2079: 'RTRSelectNotifier::_timerExpirationTime' uses undefined struct 'timeval'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(138) : error C2061: syntax error : identifier 'fd_set'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(138) : error C2059: syntax error : ')'
1>C:\DevLibs\Reuters\4.5.6\include\rtr/selectni.h(138) : error C2143: syntax error : missing ')' before ';'
Solution :-
I resolved them by using the either of the below approaches.
C:\DevLibs\Reuters\4.5.6\include\rtr\selectni.h
Added - #include <winsock2.h> for _Win32 Macro
OR
Add "x86_WindowsNT_5X " to the preprocessor list. (this is proper solution)
After that I got the below different link errors
>libsfc.lib(sslinterface.obj ) : error LNK2019: unresolved external symbol _DACS_CsLock referenced in function "public: static int __cdecl RTRSSLInterface::convertPermDataToLock(class RTRString const &,class RTRString const &,long,struct ssl_Access_Control *,int)" (?convertPermDataToLock@RTRSSLInterface@@SAHABVRTRString@@0JPAUssl_Access_Control@@H@Z)
1>libsfc.lib(sslinterface.obj) : error LNK2019: unresolved external symbol _DACS_perror referenced in function "public: static int __cdecl RTRSSLInterface::convertPermDataToLock(class RTRString const &,class RTRString const &,long,struct ssl_Access_Control *,int)" (?convertPermDataToLock@RTRSSLInterface@@SAHABVRTRString@@0JPAUssl_Access_Control@@H@Z)
1>libsfc.lib(sslinterface.obj) : error LNK2019: unresolved external symbol _DACS_GetLock refe renced in function "public: static int __cdecl RTRSSLInterface::convertPermDataToLock(class RTRString const &,class RTRString const &,long,struct ssl_Access_Control *,int)" (?convertPermDataToLock@RTRSSLInterface@@SAHABVRTRString@@0JPAUssl_Access_Control@@H@Z)
Solution:-
I resolved the above link errors by linking with dacs4w32.lib .
Now all compiler & link errors are resolved with the latest Reuters libs.
Once again thanks for every one who try to help me!
- Marked as answer by Lakshmana_1980 Tuesday, March 9, 2010 9:05 AM
Tuesday, March 9, 2010 9:04 AM