You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following structure in my project:
root
-- AllM - lib ( helpers )
-- Runner - executable
AllM has a vcpkg manifest file that has a few libraries and all implementations that require external libraries are in cpp files eliminating the need to pass along these dependencies. I'm compiling AllM as a library and I have Link Library Dependencies set to yes but I'm still getting some errors when linking my binary.
I'm attempting to keep dependencies down to the project level as well as removing header exposure for anything really to speed up my our compile times. We are starting to get to the 5+ minutes mark and most of the headers upon further look are external libraries due to it's usage in header files. It might also be related to the 50 underlying projects that get build into one single binary. Yes I am using #pragma once
What's the best practice for this case? I'm starting to think that one vcpkg manifest for my entire solution might be the way to go..
library example:
The library above is being referenced in a .exe project but I'm getting unresolved symbols even after "Link library dependencies" - which i thought would include vcpkg. 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: __cdecl cpr::Multipart::Multipart(class std::initializer_list<struct cpr::Part> const &)" (??0Multipart@cpr@@QEAA@AEBV?$initializer_list@UPart@cpr@@@std@@@Z) referenced in function "void __cdecl redacted::Net::Http::upload_dump_file(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short,class std::vector<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class std::allocator<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > > > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?upload_dump_file@Http@Net@redacted@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@GAEBV?$vector@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@V?$allocator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@@5@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: __cdecl cpr::Parameters::Parameters(class std::initializer_list<struct cpr::Parameter> const &)" (??0Parameters@cpr@@QEAA@AEBV?$initializer_list@UParameter@cpr@@@std@@@Z) referenced in function "void __cdecl redacted::Net::Http::upload_dump_file(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short,class std::vector<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class std::allocator<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > > > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?upload_dump_file@Http@Net@redacted@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@GAEBV?$vector@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@V?$allocator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@@5@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: virtual __cdecl cpr::EncodedAuthentication::~EncodedAuthentication(void)" (??1EncodedAuthentication@cpr@@UEAA@XZ) referenced in function "public: static void __cdecl std::_Default_allocator_traits<class std::allocator<struct std::_Tree_node<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication>,void *> > >::destroy<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication> >(class std::allocator<struct std::_Tree_node<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication>,void *> > &,struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication> * const)" (??$destroy@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@std@@@?$_Default_allocator_traits@V?$allocator@U?$_Tree_node@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@std@@PEAX@std@@@std@@@std@@SAXAEAV?$allocator@U?$_Tree_node@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@std@@PEAX@std@@@1@QEAU?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@1@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: __cdecl cpr::Session::Session(void)" (??0Session@cpr@@QEAA@XZ) referenced in function "class cpr::Response __cdecl cpr::Get<class cpr::Url &>(class cpr::Url &)" (??$Get@AEAVUrl@cpr@@@cpr@@YA?AVResponse@0@AEAVUrl@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Url const &)" (?SetOption@Session@cpr@@QEAAXAEBVUrl@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Get<class cpr::Url &>(class cpr::Url &)" (??$Get@AEAVUrl@cpr@@@cpr@@YA?AVResponse@0@AEAVUrl@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Parameters &&)" (?SetOption@Session@cpr@@QEAAX$$QEAVParameters@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::VerifySsl,class cpr::Url,class cpr::Parameters,class cpr::Multipart &>(class cpr::VerifySsl &&,class cpr::Url &&,class cpr::Parameters &&,class cpr::Multipart &)" (??$Post@VVerifySsl@cpr@@VUrl@2@VParameters@2@AEAVMultipart@2@@cpr@@YA?AVResponse@0@$$QEAVVerifySsl@0@$$QEAVUrl@0@$$QEAVParameters@0@AEAVMultipart@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Multipart const &)" (?SetOption@Session@cpr@@QEAAXAEBVMultipart@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::VerifySsl,class cpr::Url,class cpr::Parameters,class cpr::Multipart &>(class cpr::VerifySsl &&,class cpr::Url &&,class cpr::Parameters &&,class cpr::Multipart &)" (??$Post@VVerifySsl@cpr@@VUrl@2@VParameters@2@AEAVMultipart@2@@cpr@@YA?AVResponse@0@$$QEAVVerifySsl@0@$$QEAVUrl@0@$$QEAVParameters@0@AEAVMultipart@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Body &&)" (?SetOption@Session@cpr@@QEAAX$$QEAVBody@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::Url &,class cpr::Body>(class cpr::Url &,class cpr::Body &&)" (??$Post@AEAVUrl@cpr@@VBody@2@@cpr@@YA?AVResponse@0@AEAVUrl@0@$$QEAVBody@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::VerifySsl const &)" (?SetOption@Session@cpr@@QEAAXAEBVVerifySsl@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::VerifySsl,class cpr::Url,class cpr::Parameters,class cpr::Multipart &>(class cpr::VerifySsl &&,class cpr::Url &&,class cpr::Parameters &&,class cpr::Multipart &)" (??$Post@VVerifySsl@cpr@@VUrl@2@VParameters@2@AEAVMultipart@2@@cpr@@YA?AVResponse@0@$$QEAVVerifySsl@0@$$QEAVUrl@0@$$QEAVParameters@0@AEAVMultipart@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: class cpr::Response __cdecl cpr::Session::Get(void)" (?Get@Session@cpr@@QEAA?AVResponse@2@XZ) referenced in function "class cpr::Response __cdecl cpr::Get<class cpr::Url &>(class cpr::Url &)" (??$Get@AEAVUrl@cpr@@@cpr@@YA?AVResponse@0@AEAVUrl@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: class cpr::Response __cdecl cpr::Session::Post(void)" (?Post@Session@cpr@@QEAA?AVResponse@2@XZ) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::Url &,class cpr::Body>(class cpr::Url &,class cpr::Body &&)" (??$Post@AEAVUrl@cpr@@VBody@2@@cpr@@YA?AVResponse@0@AEAVUrl@0@$$QEAVBody@0@@Z)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following structure in my project:
root
-- AllM - lib ( helpers )
-- Runner - executable
AllM has a vcpkg manifest file that has a few libraries and all implementations that require external libraries are in cpp files eliminating the need to pass along these dependencies. I'm compiling AllM as a library and I have Link Library Dependencies set to yes but I'm still getting some errors when linking my binary.
I'm attempting to keep dependencies down to the project level as well as removing header exposure for anything really to speed up my our compile times. We are starting to get to the 5+ minutes mark and most of the headers upon further look are external libraries due to it's usage in header files. It might also be related to the 50 underlying projects that get build into one single binary. Yes I am using #pragma once
What's the best practice for this case? I'm starting to think that one vcpkg manifest for my entire solution might be the way to go..
library example:
The library above is being referenced in a .exe project but I'm getting unresolved symbols even after "Link library dependencies" - which i thought would include vcpkg.
1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: __cdecl cpr::Multipart::Multipart(class std::initializer_list<struct cpr::Part> const &)" (??0Multipart@cpr@@QEAA@AEBV?$initializer_list@UPart@cpr@@@std@@@Z) referenced in function "void __cdecl redacted::Net::Http::upload_dump_file(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short,class std::vector<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class std::allocator<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > > > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?upload_dump_file@Http@Net@redacted@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@GAEBV?$vector@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@V?$allocator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@@5@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: __cdecl cpr::Parameters::Parameters(class std::initializer_list<struct cpr::Parameter> const &)" (??0Parameters@cpr@@QEAA@AEBV?$initializer_list@UParameter@cpr@@@std@@@Z) referenced in function "void __cdecl redacted::Net::Http::upload_dump_file(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short,class std::vector<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class std::allocator<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > > > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?upload_dump_file@Http@Net@redacted@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@GAEBV?$vector@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@V?$allocator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@@5@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: virtual __cdecl cpr::EncodedAuthentication::~EncodedAuthentication(void)" (??1EncodedAuthentication@cpr@@UEAA@XZ) referenced in function "public: static void __cdecl std::_Default_allocator_traits<class std::allocator<struct std::_Tree_node<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication>,void *> > >::destroy<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication> >(class std::allocator<struct std::_Tree_node<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication>,void *> > &,struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class cpr::EncodedAuthentication> * const)" (??$destroy@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@std@@@?$_Default_allocator_traits@V?$allocator@U?$_Tree_node@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@std@@PEAX@std@@@std@@@std@@SAXAEAV?$allocator@U?$_Tree_node@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@std@@PEAX@std@@@1@QEAU?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VEncodedAuthentication@cpr@@@1@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: __cdecl cpr::Session::Session(void)" (??0Session@cpr@@QEAA@XZ) referenced in function "class cpr::Response __cdecl cpr::Get<class cpr::Url &>(class cpr::Url &)" (??$Get@AEAVUrl@cpr@@@cpr@@YA?AVResponse@0@AEAVUrl@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Url const &)" (?SetOption@Session@cpr@@QEAAXAEBVUrl@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Get<class cpr::Url &>(class cpr::Url &)" (??$Get@AEAVUrl@cpr@@@cpr@@YA?AVResponse@0@AEAVUrl@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Parameters &&)" (?SetOption@Session@cpr@@QEAAX$$QEAVParameters@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::VerifySsl,class cpr::Url,class cpr::Parameters,class cpr::Multipart &>(class cpr::VerifySsl &&,class cpr::Url &&,class cpr::Parameters &&,class cpr::Multipart &)" (??$Post@VVerifySsl@cpr@@VUrl@2@VParameters@2@AEAVMultipart@2@@cpr@@YA?AVResponse@0@$$QEAVVerifySsl@0@$$QEAVUrl@0@$$QEAVParameters@0@AEAVMultipart@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Multipart const &)" (?SetOption@Session@cpr@@QEAAXAEBVMultipart@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::VerifySsl,class cpr::Url,class cpr::Parameters,class cpr::Multipart &>(class cpr::VerifySsl &&,class cpr::Url &&,class cpr::Parameters &&,class cpr::Multipart &)" (??$Post@VVerifySsl@cpr@@VUrl@2@VParameters@2@AEAVMultipart@2@@cpr@@YA?AVResponse@0@$$QEAVVerifySsl@0@$$QEAVUrl@0@$$QEAVParameters@0@AEAVMultipart@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::Body &&)" (?SetOption@Session@cpr@@QEAAX$$QEAVBody@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::Url &,class cpr::Body>(class cpr::Url &,class cpr::Body &&)" (??$Post@AEAVUrl@cpr@@VBody@2@@cpr@@YA?AVResponse@0@AEAVUrl@0@$$QEAVBody@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: void __cdecl cpr::Session::SetOption(class cpr::VerifySsl const &)" (?SetOption@Session@cpr@@QEAAXAEBVVerifySsl@2@@Z) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::VerifySsl,class cpr::Url,class cpr::Parameters,class cpr::Multipart &>(class cpr::VerifySsl &&,class cpr::Url &&,class cpr::Parameters &&,class cpr::Multipart &)" (??$Post@VVerifySsl@cpr@@VUrl@2@VParameters@2@AEAVMultipart@2@@cpr@@YA?AVResponse@0@$$QEAVVerifySsl@0@$$QEAVUrl@0@$$QEAVParameters@0@AEAVMultipart@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: class cpr::Response __cdecl cpr::Session::Get(void)" (?Get@Session@cpr@@QEAA?AVResponse@2@XZ) referenced in function "class cpr::Response __cdecl cpr::Get<class cpr::Url &>(class cpr::Url &)" (??$Get@AEAVUrl@cpr@@@cpr@@YA?AVResponse@0@AEAVUrl@0@@Z) 1>redacted.lib(Http.obj) : error LNK2019: unresolved external symbol "public: class cpr::Response __cdecl cpr::Session::Post(void)" (?Post@Session@cpr@@QEAA?AVResponse@2@XZ) referenced in function "class cpr::Response __cdecl cpr::Post<class cpr::Url &,class cpr::Body>(class cpr::Url &,class cpr::Body &&)" (??$Post@AEAVUrl@cpr@@VBody@2@@cpr@@YA?AVResponse@0@AEAVUrl@0@$$QEAVBody@0@@Z)
Beta Was this translation helpful? Give feedback.
All reactions