Related
I've been like a pair of days trying to get a C++ app, but i'm stuck in the library / dll process, I have problems with those two.
I downloaded the c++ release for protobuf 3.0.0, made the .lib and the .dll ( to test the two of them ), I used this in order to get the .sln
cmake -Dprotobuf_BUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="../install" ../cmake
it gave me a solution which I opened with vs2015 and compiled for debug, then compiled me the files, then I generated the includes with the .bat provided.
So, when I go to VS2015 and try to compile with the .lib linked, it gives me this error
1>libprotobufd.lib(dynamic_message.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj
I am sure that I'm running the app in the lib building as debug and the game as debug too.
Also, I tried the .dll ( deleting the library and the references ), writing in the top of the main.cpp file "#define PROTOBUF_USE_DLLS" and I get a lot of linker errors like this
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::internal::LogMessage::LogMessage(enum google::protobuf::LogLevel,char const *,int)" (??0LogMessage#internal#protobuf#google##QAE#W4LogLevel#23#PBDH#Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::internal::LogMessage::~LogMessage(void)" (??1LogMessage#internal#protobuf#google##QAE#XZ) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: class google::protobuf::internal::LogMessage & __thiscall google::protobuf::internal::LogMessage::operator<<(char const *)" (??6LogMessage#internal#protobuf#google##QAEAAV0123#PBD#Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::internal::LogFinisher::operator=(class google::protobuf::internal::LogMessage &)" (??4LogFinisher#internal#protobuf#google##QAEXAAVLogMessage#123##Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::Closure::~Closure(void)" (??1Closure#protobuf#google##UAE#XZ) referenced in function "public: virtual void * __thiscall google::protobuf::Closure::`scalar deleting destructor'(unsigned int)" (??_GClosure#protobuf#google##UAEPAXI#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::internal::FunctionClosure0::~FunctionClosure0(void)" (??1FunctionClosure0#internal#protobuf#google##UAE#XZ) referenced in function "public: virtual void * __thiscall google::protobuf::internal::FunctionClosure0::`scalar deleting destructor'(unsigned int)" (??_GFunctionClosure0#internal#protobuf#google##UAEPAXI#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::VerifyVersion(int,int,char const *)" (?VerifyVersion#internal#protobuf#google##YAXHHPBD#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::OnShutdown(void (__cdecl*)(void))" (?OnShutdown#internal#protobuf#google##YAXP6AXXZ#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: void * __thiscall google::protobuf::Arena::AllocateAligned(class type_info const *,unsigned int)" (?AllocateAligned#Arena#protobuf#google##QAEPAXPBVtype_info##I#Z) referenced in function "public: struct google::protobuf::internal::InternalMetadataWithArena::Container * __thiscall google::protobuf::Arena::CreateInternal<struct google::protobuf::internal::InternalMetadataWithArena::Container>(bool)" (??$CreateInternal#UContainer#InternalMetadataWithArena#internal#protobuf#google###Arena#protobuf#google##QAEPAUContainer#InternalMetadataWithArena#internal#12#_N#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::Arena::AddListNode(void *,void (__cdecl*)(void *))" (?AddListNode#Arena#protobuf#google##QAEXPAXP6AX0#Z#Z) referenced in function "public: struct google::protobuf::internal::InternalMetadataWithArena::Container * __thiscall google::protobuf::Arena::CreateInternal<struct google::protobuf::internal::InternalMetadataWithArena::Container>(bool)" (??$CreateInternal#UContainer#InternalMetadataWithArena#internal#protobuf#google###Arena#protobuf#google##QAEPAUContainer#InternalMetadataWithArena#internal#12#_N#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::GoogleOnceInitImpl(int *,class google::protobuf::Closure *)" (?GoogleOnceInitImpl#protobuf#google##YAXPAHPAVClosure#12##Z) referenced in function "void __cdecl google::protobuf::GoogleOnceInit(int *,void (__cdecl*)(void))" (?GoogleOnceInit#protobuf#google##YAXPAHP6AXXZ#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::MergeFromFail(char const *,int)" (?MergeFromFail#internal#protobuf#google##YAXPBDH#Z) referenced in function "public: void __thiscall tryPhy::PhyData::MergeFrom(class tryPhy::PhyData const &)" (?MergeFrom#PhyData#tryPhy##QAEXABV12##Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "private: void __thiscall google::protobuf::UnknownFieldSet::ClearFallback(void)" (?ClearFallback#UnknownFieldSet#protobuf#google##AAEXXZ) referenced in function "public: void __thiscall google::protobuf::UnknownFieldSet::Clear(void)" (?Clear#UnknownFieldSet#protobuf#google##QAEXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class google::protobuf::MessageLite * __thiscall google::protobuf::MessageLite::New(class google::protobuf::Arena *)const " (?New#MessageLite#protobuf#google##UBEPAV123#PAVArena#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::MessageLite::InitializationErrorString(void)const " (?InitializationErrorString#MessageLite#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall google::protobuf::MessageLite::InternalSerializeWithCachedSizesToArray(bool,unsigned char *)const " (?InternalSerializeWithCachedSizesToArray#MessageLite#protobuf#google##UBEPAE_NPAE#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static class google::protobuf::DescriptorPool const * __cdecl google::protobuf::DescriptorPool::generated_pool(void)" (?generated_pool#DescriptorPool#protobuf#google##SAPBV123#XZ) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: class google::protobuf::FileDescriptor const * __thiscall google::protobuf::DescriptorPool::FindFileByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?FindFileByName#DescriptorPool#protobuf#google##QBEPBVFileDescriptor#23#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const *,int)" (?InternalAddGeneratedFile#DescriptorPool#protobuf#google##SAXPBXH#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::CopyFrom(class google::protobuf::Message const &)" (?CopyFrom#Message#protobuf#google##UAEXABV123##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom#Message#protobuf#google##UAEXABV123##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::Message::InitializationErrorString(void)const " (?InitializationErrorString#Message#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::DiscardUnknownFields(void)" (?DiscardUnknownFields#Message#protobuf#google##UAEXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall google::protobuf::Message::SpaceUsed(void)const " (?SpaceUsed#Message#protobuf#google##UBEHXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::Message::GetTypeName(void)const " (?GetTypeName#Message#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::Clear(void)" (?Clear#Message#protobuf#google##UAEXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::Message::IsInitialized(void)const " (?IsInitialized#Message#protobuf#google##UBE_NXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::CheckTypeAndMergeFrom(class google::protobuf::MessageLite const &)" (?CheckTypeAndMergeFrom#Message#protobuf#google##UAEXABVMessageLite#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::Message::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Message#protobuf#google##UAE_NPAVCodedInputStream#io#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall google::protobuf::Message::ByteSize(void)const " (?ByteSize#Message#protobuf#google##UBEHXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Message#protobuf#google##UBEXPAVCodedOutputStream#io#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall google::protobuf::Message::SetCachedSize(int)const " (?SetCachedSize#Message#protobuf#google##EBEXH#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const *,void (__cdecl*)(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &))" (?InternalRegisterGeneratedFile#MessageFactory#protobuf#google##SAXPBDP6AXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(class google::protobuf::Descriptor const *,class google::protobuf::Message const *)" (?InternalRegisterGeneratedMessage#MessageFactory#protobuf#google##SAXPBVDescriptor#23#PBVMessage#23##Z) referenced in function "void __cdecl tryPhy::`anonymous namespace'::protobuf_RegisterTypes(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?protobuf_RegisterTypes#?A0x859c682f#tryPhy##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "private: bool __thiscall google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned __int64 *)" (?ReadLittleEndian64Fallback#CodedInputStream#io#protobuf#google##AAE_NPA_K#Z) referenced in function "public: bool __thiscall google::protobuf::io::CodedInputStream::ReadLittleEndian64(unsigned __int64 *)" (?ReadLittleEndian64#CodedInputStream#io#protobuf#google##QAE_NPA_K#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "private: unsigned int __thiscall google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)" (?ReadTagFallback#CodedInputStream#io#protobuf#google##AAEII#Z) referenced in function "public: struct std::pair<unsigned int,bool> __thiscall google::protobuf::io::CodedInputStream::ReadTagWithCutoff(unsigned int)" (?ReadTagWithCutoff#CodedInputStream#io#protobuf#google##QAE?AU?$pair#I_N#std##I#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl google::protobuf::internal::WireFormatLite::SkipField(class google::protobuf::io::CodedInputStream *,unsigned int)" (?SkipField#WireFormatLite#internal#protobuf#google##SA_NPAVCodedInputStream#io#34#I#Z) referenced in function "public: virtual bool __thiscall tryPhy::PhyData::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#PhyData#tryPhy##UAE_NPAVCodedInputStream#io#protobuf#google###Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteDouble(int,double,class google::protobuf::io::CodedOutputStream *)" (?WriteDouble#WireFormatLite#internal#protobuf#google##SAXHNPAVCodedOutputStream#io#34##Z) referenced in function "public: virtual void __thiscall tryPhy::PhyData::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#PhyData#tryPhy##UBEXPAVCodedOutputStream#io#protobuf#google###Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static class google::protobuf::internal::GeneratedMessageReflection * __cdecl google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(class google::protobuf::Descriptor const *,class google::protobuf::Message const *,int const * const,int,int,int,int,int,int)" (?NewGeneratedMessageReflection#GeneratedMessageReflection#internal#protobuf#google##SAPAV1234#PBVDescriptor#34#PBVMessage#34#QBHHHHHHH#Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::ReflectionOps::Merge(class google::protobuf::Message const &,class google::protobuf::Message *)" (?Merge#ReflectionOps#internal#protobuf#google##SAXABVMessage#34#PAV534##Z) referenced in function "public: virtual void __thiscall tryPhy::PhyData::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom#PhyData#tryPhy##UAEXABVMessage#protobuf#google###Z)
1>bin\windows\multiplayer.exe : fatal error LNK1120: 40 unresolved externals
I'm a bit lost and stuck, so if anyone can help me to redirect where I have to search for, I'll be grateful.
Thank you for your time
As I can't comment, will post this as an answer.
If I understood the structure of your projects correctly, this thing:
`1>libprotobufd.lib(dynamic_message.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj`
tells you that the Runtime library setting for the library you're trying to link and your project does not match.
Check Project Properties -> C/C++ -> Code generation -> Runtime Library and make sure this setting is the same for both projects.
P.S. also having a problem linking with static library containing proto-files in vs2015 update 3 but seems that your case is different..
Maybe you should add the PROTOBUF_USE_DLLS define in the Visual Studio project properties under C/C++ -> Preprocessor -> Preprocessor definitions? I'm guessing you might need that define when compiling protobuf the protobuf output cpp files too.
I am trying to create a dll for pdfium. I am using Visual Studio 2013 (C++)
I've tried following instructions from https://github.com/pvginkel/PdfiumViewer but that hasn't worked.(I am trying to get a pdfium dll for a project that is not PdfiumViewer). I get the following errors:
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(1193,5): warning MSB8012: TargetPath(\build\Debug\lib\pdfium.dll) does not match the Linker's OutputFile property value (C:\build\Debug\pdfium.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2> Creating library \build\Debug\pdfium.lib and object \build\Debug\pdfium.exp
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_CreateFontA referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_ByteString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_ByteString##E#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateFontA
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_CreateFontW referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_WideString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_WideString##E#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fpdfdoc.lib(doc_form.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_EnumFontFamiliesExA referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont##YAHAEAUtagLOGFONTA###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_EnumFontFamiliesExA
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetStockObject referenced in function "int __cdecl RetrieveStockFont(int,unsigned char,struct tagLOGFONTA &)" (?RetrieveStockFont##YAHHEAEAUtagLOGFONTA###Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetObjectA referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_ByteString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_ByteString##E#Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetObjectW referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_WideString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_WideString##E#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW
2>fxge.lib(fx_win32_dwrite.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont##YAHAEAUtagLOGFONTA###Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont##YAHAEAUtagLOGFONTA###Z)
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleDC referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateCompatibleDC
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_CreateCompatibleDC
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_CreateFontIndirectA referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateFontIndirectA
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_DeleteDC
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_DeleteDC
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetCharWidthW referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetFontData referenced in function "class CFX_ByteString __cdecl _FPDF_GetPSNameFromTT(struct HDC__ *)" (?_FPDF_GetPSNameFromTT##YA?AVCFX_ByteString##PEAUHDC__###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_GetFontData
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetOutlineTextMetricsW referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_SelectObject referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_SelectObject
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_SelectObject
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_BitBlt referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" (?GetDIBits#CGdiDisplayDriver##MEAAHPEAVCFX_DIBitmap##HHPEAXH#Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_BitBlt
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateBitmap referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleBitmap referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" (?GetDIBits#CGdiDisplayDriver##MEAAHPEAVCFX_DIBitmap##HHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreatePen referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" (?DrawCosmeticLine#CGdiDeviceDriver##MEAAHMMMMIHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" (?GetClipRgn#CGdiDeviceDriver##MEAAPEAXXZ)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_CreateRectRgn
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateSolidBrush referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::FillRect(struct FX_RECT const *,unsigned int,int,void *,int)" (?FillRect#CGdiDeviceDriver##MEAAHPEBUFX_RECT##IHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtEscape referenced in function "int __cdecl GetPSLevel(struct HDC__ *)" (?GetPSLevel##YAHPEAUHDC__###Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_ExtEscape
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetClipBox referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::GetClipBox(struct FX_RECT *)" (?GetClipBox#CGdiDeviceDriver##MEAAHPEAUFX_RECT###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetClipRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" (?GetClipRgn#CGdiDeviceDriver##MEAAPEAXXZ)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_GetClipRgn
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_GetDeviceCaps
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetDIBits referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" (?GetDIBits#CGdiDisplayDriver##MEAAHPEAVCFX_DIBitmap##HHPEAXH#Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_GetDIBits
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetObjectType referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_IntersectClipRect referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathFill(class CFX_PathData const *,class CFX_Matrix const *,int)" (?SetClip_PathFill#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_LineTo referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" (?DrawCosmeticLine#CGdiDeviceDriver##MEAAHMMMMIHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_RestoreDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" (?RestoreState#CGdiDeviceDriver##MEAAXH#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_RestoreDC
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SaveDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" (?RestoreState#CGdiDeviceDriver##MEAAXH#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_SaveDC
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SelectClipRgn referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClipRgn(void *)" (?SetClipRgn#CGdiDeviceDriver##MEAAHPEAX#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetDIBitsToDevice referenced in function "protected: int __cdecl CGdiDeviceDriver::GDI_SetDIBits(class CFX_DIBitmap const *,struct FX_RECT const *,int,int,void *)" (?GDI_SetDIBits#CGdiDeviceDriver##IEAAHPEBVCFX_DIBitmap##PEBUFX_RECT##HHPEAX#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetPolyFillMode referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StretchDIBits referenced in function "protected: int __cdecl CGdiDeviceDriver::GDI_SetDIBits(class CFX_DIBitmap const *,struct FX_RECT const *,int,int,void *)" (?GDI_SetDIBits#CGdiDeviceDriver##IEAAHPEBVCFX_DIBitmap##PEBUFX_RECT##HHPEAX#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetStretchBltMode referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetTextMetricsW referenced in function "public: virtual int __cdecl CWin32FontInfo::GetFontCharset(void *,int &)" (?GetFontCharset#CWin32FontInfo##UEAAHPEAXAEAH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBSection referenced in function "public: __cdecl CFX_WinBitmapDevice::CFX_WinBitmapDevice(int,int,enum FXDIB_Format)" (??0CFX_WinBitmapDevice##QEAA#HHW4FXDIB_Format###Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_CreateDIBSection
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_BeginPath referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CloseFigure referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_EndPath referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_FillPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SelectClipPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathFill(class CFX_PathData const *,class CFX_Matrix const *,int)" (?SetClip_PathFill#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetMiterLimit referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StrokeAndFillPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StrokePath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_WidenPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathStroke(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *)" (?SetClip_PathStroke#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtCreatePen referenced in function "struct HPEN__ * __cdecl _CreatePen(class CFX_GraphStateData const *,class CFX_Matrix const *,unsigned int)" (?_CreatePen##YAPEAUHPEN__##PEBVCFX_GraphStateData##PEBVCFX_Matrix##I#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_MoveToEx referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" (?DrawCosmeticLine#CGdiDeviceDriver##MEAAHMMMMIHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_PolyBezierTo referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetTextFaceA referenced in function "public: virtual int __cdecl CWin32FontInfo::GetFaceName(void *,class CFX_ByteString &)" (?GetFaceName#CWin32FontInfo##UEAAHPEAXAEAVCFX_ByteString###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_FillRect referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::FillRect(struct FX_RECT const *,unsigned int,int,void *,int)" (?FillRect#CGdiDeviceDriver##MEAAHPEBUFX_RECT##IHPEAXH#Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBitmap referenced in function "public: static struct HBITMAP__ * __cdecl CFX_WindowsDIB::GetDDBitmap(class CFX_DIBitmap const *,struct HDC__ *)" (?GetDDBitmap#CFX_WindowsDIB##SAPEAUHBITMAP__##PEBVCFX_DIBitmap##PEAUHDC__###Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function "public: static class CFX_DIBitmap * __cdecl CFX_WindowsDIB::LoadDIBitmap(struct WINDIB_Open_Args_)" (?LoadDIBitmap#CFX_WindowsDIB##SAPEAVCFX_DIBitmap##UWINDIB_Open_Args_###Z)
2>fxge.lib(fx_win32_dwrite.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentObject referenced in function "public: long __cdecl CDwGdiTextRenderer::DrawGlyphRun(struct FX_RECT const &,class CFX_ClipRgn *,struct DWRITE_MATRIX const *,float,float,enum DWRITE_MEASURING_MODE,struct DWRITE_GLYPH_RUN const *,unsigned long const &)" (?DrawGlyphRun#CDwGdiTextRenderer##QEAAJAEBUFX_RECT##PEAVCFX_ClipRgn##PEBUDWRITE_MATRIX##MMW4DWRITE_MEASURING_MODE##PEBUDWRITE_GLYPH_RUN##AEBK#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2019: unresolved external symbol __imp_GetRegionData referenced in function "public: int __cdecl CPSPrinterDriver::Init(struct HDC__ *,int,int)" (?Init#CPSPrinterDriver##QEAAHPEAUHDC__##HH#Z)
2>\build\Debug\pdfium.dll : fatal error LNK1120: 57 unresolved externals
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does anyone have an idea on what I am supposed to do?
I downloaded and build pdfium as described in https://github.com/pvginkel/PdfiumViewer. My steps:
Download pdfium
Generate Visual Studio projects and solution
Open solution all.sln
Build all.sln, error LNK1112. I change target machine for project pdfium to /MACHINE:x86. Now all is ok, I get static lib
I change pdfium project type to dll
Add FPDFSDK_EXPORTS to preprocessor definitions
Add dependencies as described in https://github.com/pvginkel/PdfiumViewer
I change toolset to v120_xp
Build, linker errors. I change library list to (all libraries from $(OutDir)):
kernel32.lib
user32.lib
advapi32.lib
gdi32.lib
winmm.lib
$(OutDir)\lib\bigint.lib
$(OutDir)\lib\fdrm.lib
$(OutDir)\lib\formfiller.lib
$(OutDir)\lib\fpdfapi.lib
$(OutDir)\lib\fpdfdoc.lib
$(OutDir)\lib\fpdftext.lib
$(OutDir)\lib\freetype.lib
$(OutDir)\lib\fx_lpng.lib
$(OutDir)\lib\fxcodec.lib
$(OutDir)\lib\fxcrt.lib
$(OutDir)\lib\fxedit.lib
$(OutDir)\lib\fxge.lib
$(OutDir)\lib\gmock.lib
$(OutDir)\lib\gtest.lib
$(OutDir)\lib\gtest_main.lib
$(OutDir)\lib\icui18n.lib
$(OutDir)\lib\icuuc.lib
$(OutDir)\lib\javascript.lib
$(OutDir)\lib\jsapi.lib
$(OutDir)\lib\pdfwindow.lib
$(OutDir)\lib\v8_base_0.lib
$(OutDir)\lib\v8_base_1.lib
$(OutDir)\lib\v8_base_2.lib
$(OutDir)\lib\v8_base_3.lib
$(OutDir)\lib\v8_libbase.lib
$(OutDir)\lib\v8_libplatform.lib
$(OutDir)\lib\v8_nosnapshot.lib
$(OutDir)\lib\v8_snapshot.lib
Buil, Now all is ok, I get dynamic lib (dll)
I download file pdfiumviewer.cpp and add it to project
Build, compilation error, no header file found
Add third_party\freetype\include;v8;v8\include; to addition include directories
Build, compilation error.
In file pdfiumviewer.cpp replace string #include "../../fpdfsdk/include/fpdfview.h" to #include "../../public/fpdfview.h"
Build, now all is ok, I get dynamic lib (dll)
One more thing, if you want build pdfium_test project, you need fix fpdfview.h file:
#define DLLEXPORT __declspec( dllexport )
#define STDCALL __stdcall
#else
#define DLLEXPORT
#if !defined(_WIN64)
// On Windows Win32 (not x64) requires __stdcall convention
#define STDCALL __stdcall
#else
#define STDCALL
#endif // !defined(_WIN64)
#endif
For build pdfium_embeddertests you can just turn off Treat warnings as errors option, but I do not know about consequences.
If anyone is still looking for an answer to this, an alternate is to just download the precompiled libraries.
https://github.com/bblanchon/pdfium-binaries/ generates the latest binaries from the chromium source for Linux, Windows, Mac.
I'm writing a C++ program using Chilkat library. I've linked the whole library to the project as follows:
project > properties > C/C++ > General > Additional Include Directories > C:\chilkat\include (That's where I have the library)
AND
project > properties > Linker > Input > Additional Dependencies > ... C:\chilkat\libs\ChilkatDbgDll.lib; ...
Chilkat library came with 4 kinds of .lib files, each for different kinds of runtime, so I used the .lib which best suited my project (Multi-Threaded Debug DLL).
The damn thing still gives me this:
1>------ Build started: Project: botnet, Configuration: Debug Win32 ------
1>Build started 28.08.2013 20:47:29.
1>InitializeBuildStatus:
1> Touching "Debug\botnet.unsuccessfulbuild".
1>ClCompile:
1> botnet.cpp
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__getsockopt#20 referenced in function "public: void __thiscall ChilkatSocket::logSocketOptions(class LogBase &)" (?logSocketOptions#ChilkatSocket##QAEXAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__setsockopt#20 referenced in function "private: void __thiscall ChilkatSocket::checkSetBufSizes(class LogBase &)" (?checkSetBufSizes#ChilkatSocket##AAEXAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__accept#12 referenced in function "private: bool __thiscall ChilkatSocket::acceptNextConnection2(class ChilkatSocket &,bool,unsigned int,class LogBase &,bool &)" (?acceptNextConnection2#ChilkatSocket##AAE_NAAV1#_NIAAVLogBase##AA_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__ioctlsocket#12 referenced in function "public: void __thiscall ChilkatSocket::setNonBlocking(void)" (?setNonBlocking#ChilkatSocket##QAEXXZ)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__WSAGetLastError#0 referenced in function "private: bool __thiscall ChilkatSocket::createSocket_ipv4(class LogBase &,bool)" (?createSocket_ipv4#ChilkatSocket##AAE_NAAVLogBase##_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__socket#12 referenced in function "private: bool __thiscall ChilkatSocket::createSocket_ipv4(class LogBase &,bool)" (?createSocket_ipv4#ChilkatSocket##AAE_NAAVLogBase##_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__WSAStartup#8 referenced in function "bool __cdecl startupWSA(class LogBase &)" (?startupWSA##YA_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__ntohs#4 referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" (?ck_getsockname_ipv4#ChilkatSocket##AAE_NAAVStringBuffer#chilkat##AAHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__inet_ntoa#4 referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" (?ck_getsockname_ipv4#ChilkatSocket##AAE_NAAVStringBuffer#chilkat##AAHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__getsockname#12 referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" (?ck_getsockname_ipv4#ChilkatSocket##AAE_NAAVStringBuffer#chilkat##AAHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__gethostbyname#4 referenced in function "struct hostent * __cdecl ck_gethostbyname(char const *,class LogBase &)" (?ck_gethostbyname##YAPAUhostent##PBDAAVLogBase###Z)
1>ChilkatDbgDll.lib(HostnameResolve.obj) : error LNK2001: unresolved external symbol __imp__gethostbyname#4
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__getpeername#12 referenced in function "public: bool __thiscall ChilkatSocket::GetPeerName(class chilkat::StringBuffer &,int &)" (?GetPeerName#ChilkatSocket##QAE_NAAVStringBuffer#chilkat##AAH#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__inet_addr#4 referenced in function "public: static bool __cdecl ChilkatSocket::isDottedIpAddress(char const *)" (?isDottedIpAddress#ChilkatSocket##SA_NPBD#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__htons#4 referenced in function "public: static bool __cdecl ChilkatSocket::isDottedIpAddress(char const *)" (?isDottedIpAddress#ChilkatSocket##SA_NPBD#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__connect#12 referenced in function "private: bool __thiscall ChilkatSocket::connectSocket2_ipv4(char const *,int,unsigned int,class LogBase &,class ProgressMonitor *,bool &)" (?connectSocket2_ipv4#ChilkatSocket##AAE_NPBDHIAAVLogBase##PAVProgressMonitor##AA_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__select#20 referenced in function "public: bool __thiscall ChilkatSocket::waitWriteable2(unsigned int,class LogBase &)" (?waitWriteable2#ChilkatSocket##QAE_NIAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet#8 referenced in function "public: bool __thiscall ChilkatSocket::waitWriteableMs2(unsigned int,bool,class SocketParams &,class LogBase &)" (?waitWriteableMs2#ChilkatSocket##QAE_NI_NAAVSocketParams##AAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__bind#12 referenced in function "private: bool __thiscall ChilkatSocket::bindSysCall2(void *,int,class LogBase &)" (?bindSysCall2#ChilkatSocket##AAE_NPAXHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__listen#8 referenced in function "public: bool __thiscall ChilkatSocket::listenOnPort(int &,int,bool,class LogBase &)" (?listenOnPort#ChilkatSocket##QAE_NAAHH_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__gethostname#8 referenced in function "private: static bool __cdecl ChilkatSocket::getLocalHostName_inner(class chilkat::StringBuffer &,class LogBase &)" (?getLocalHostName_inner#ChilkatSocket##CA_NAAVStringBuffer#chilkat##AAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__closesocket#4 referenced in function "public: bool __thiscall ChilkatSocket::NewSocketAndListen(bool,class LogBase &)" (?NewSocketAndListen#ChilkatSocket##QAE_N_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__shutdown#8 referenced in function "public: bool __thiscall ChilkatSocket::NewSocketAndListen(bool,class LogBase &)" (?NewSocketAndListen#ChilkatSocket##QAE_N_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__recv#16 referenced in function "public: bool __thiscall ChilkatSocket::IsConnected(class LogBase &)" (?IsConnected#ChilkatSocket##QAE_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__send#16 referenced in function "public: bool __thiscall ChilkatSocket::SendBytes2(unsigned char const *,unsigned int,unsigned int,unsigned int,class LogBase &,class SocketParams &)" (?SendBytes2#ChilkatSocket##QAE_NPBEIIIAAVLogBase##AAVSocketParams###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertVerifyRevocation#28 referenced in function "public: int __thiscall MsCertificate::checkRevoked(class LogBase &)" (?checkRevoked#MsCertificate##QAEHAAVLogBase###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertFreeCertificateContext#4 referenced in function "public: void __thiscall MsCertificate::dotNetDispose(void)" (?dotNetDispose#MsCertificate##QAEXXZ)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext#4
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext#4
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertNameToStrW#20 referenced in function "void __cdecl _getCertNameStr(struct _CRYPTOAPI_BLOB *,unsigned long,class XString &)" (?_getCertNameStr##YAXPAU_CRYPTOAPI_BLOB##KAAVXString###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertDuplicateCertificateContext#4 referenced in function "public: __thiscall MsCertificate::MsCertificate(struct _CERT_CONTEXT const *,bool,class LogBase &)" (??0MsCertificate##QAE#PBU_CERT_CONTEXT##_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext#4
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertSetCertificateContextProperty#16 referenced in function "public: bool __thiscall MsCertificate::linkPrivateKey(class XString &,bool,bool,class LogBase &)" (?linkPrivateKey#MsCertificate##QAE_NAAVXString##_N1AAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertSetCertificateContextProperty#16
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CryptDecodeObject#28 referenced in function "public: static void __cdecl MsCertificate::getRfc822NameFromContext(struct _CERT_CONTEXT const *,class XString &)" (?getRfc822NameFromContext#MsCertificate##SAXPBU_CERT_CONTEXT##AAVXString###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertGetIntendedKeyUsage#16 referenced in function "public: unsigned int __thiscall MsCertificate::getIntendedKeyUsage(void)" (?getIntendedKeyUsage#MsCertificate##QAEIXZ)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertGetCertificateContextProperty#16 referenced in function "private: bool __thiscall MsCertificate::getKeyProviderInfo(int,class LogBase &)" (?getKeyProviderInfo#MsCertificate##AAE_NHAAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateContextProperty#16
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertCreateCertificateContext#12 referenced in function "public: static class MsCertificate * __cdecl MsCertificate::createFromDer(unsigned char const *,unsigned int,class LogBase &)" (?createFromDer#MsCertificate##SAPAV1#PBEIAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertDuplicateStore#4 referenced in function "public: class CertificateStore * __thiscall CertificateStore::dupStore(class LogBase *)" (?dupStore#CertificateStore##QAEPAV1#PAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertEnumCertificatesInStore#8 referenced in function "private: void __thiscall CertificateStore::deleteKeyContainers(void)" (?deleteKeyContainers#CertificateStore##AAEXXZ)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertCloseStore#8 referenced in function "public: void __thiscall CertificateStore::dotNetDispose(void)" (?dotNetDispose#CertificateStore##QAEXXZ)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertCloseStore#8
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertOpenStore#20 referenced in function "public: static class CertificateStore * __cdecl CertificateStore::createMemoryStore(class LogBase *)" (?createMemoryStore#CertificateStore##SAPAV1#PAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertOpenStore#20
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertFindCertificateInStore#24 referenced in function "public: class MsCertificate * __thiscall CertificateStore::findIssuer(class MsCertificate &,class LogBase &,bool)" (?findIssuer#CertificateStore##QAEPAVMsCertificate##AAV2#AAVLogBase##_N#Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertAddEncodedCertificateToStore#24 referenced in function "public: bool __thiscall CertificateStore::addEncodedCertificateUtf8(char const *,class LogBase &)" (?addEncodedCertificateUtf8#CertificateStore##QAE_NPBDAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertAddCertificateContextToStore#16 referenced in function "public: bool __thiscall CertificateStore::addCertWithPrivateKey(class MsCertificate &,class XString &,bool,class LogBase &,bool)" (?addCertWithPrivateKey#CertificateStore##QAE_NAAVMsCertificate##AAVXString##_NAAVLogBase##2#Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertSaveStore#24 referenced in function "private: bool __thiscall CertificateStore::saveCertStore(class LogBase &)" (?saveCertStore#CertificateStore##AAE_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertDeleteCertificateFromStore#4 referenced in function "public: bool __thiscall CertificateStore::removeCertificate(class MsCertificate *,class LogBase &)" (?removeCertificate#CertificateStore##QAE_NPAVMsCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertGetSubjectCertificateFromStore#12 referenced in function "public: class MsCertificate * __thiscall CertificateStore::findCertificate(struct _CERT_INFO *)" (?findCertificate#CertificateStore##QAEPAVMsCertificate##PAU_CERT_INFO###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertGetSubjectCertificateFromStore#12
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgControl#16 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgGetParam#20 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgClose#4 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgUpdate#16 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgOpenToDecode#24 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptDecryptMessage#24 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInner(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInner#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptSignMessage#28 referenced in function "public: static bool __cdecl _ckMsCrypto::msCryptoSignature(class CryptoSettings2 &,class Certificate &,bool,class SystemCerts &,unsigned char const *,unsigned int,int,class DataBuffer &,class LogBase &)" (?msCryptoSignature#_ckMsCrypto##SA_NAAVCryptoSettings2##AAVCertificate##_NAAVSystemCerts##PBEIHAAVDataBuffer##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptEncodeObject#20 referenced in function "public: static bool __cdecl _ckMsCrypto::msCryptoSignature(class CryptoSettings2 &,class Certificate &,bool,class SystemCerts &,unsigned char const *,unsigned int,int,class DataBuffer &,class LogBase &)" (?msCryptoSignature#_ckMsCrypto##SA_NAAVCryptoSettings2##AAVCertificate##_NAAVSystemCerts##PBEIHAAVDataBuffer##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptVerifyMessageSignature#28 referenced in function "private: static bool __cdecl _ckMsCrypto::msVerifySignatureInner(class CryptoSettings2 &,class DataBuffer const &,class DataBuffer &,class ExtPtrArray &,class LogBase &)" (?msVerifySignatureInner#_ckMsCrypto##CA_NAAVCryptoSettings2##ABVDataBuffer##AAV3#AAVExtPtrArray##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptVerifyDetachedMessageSignature#32 referenced in function "private: static bool __cdecl _ckMsCrypto::msVerifyDetachedSignatureInner(class CryptoSettings2 &,class DataBuffer const &,unsigned char const *,unsigned long,class ExtPtrArray &,class LogBase &)" (?msVerifyDetachedSignatureInner#_ckMsCrypto##CA_NAAVCryptoSettings2##ABVDataBuffer##PBEKAAVExtPtrArray##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptEncryptMessage#28 referenced in function "private: static bool __cdecl _ckMsCrypto::msEncryptInner(class CryptoSettings2 &,unsigned char const *,unsigned long,class DataBuffer &,class ExtPtrArray &,class LogBase &)" (?msEncryptInner#_ckMsCrypto##CA_NAAVCryptoSettings2##PBEKAAVDataBuffer##AAVExtPtrArray##AAVLogBase###Z)
1>c:\users\simboyd\documents\visual studio 2010\Projects\botnet\Debug\botnet.exe : fatal error LNK1120: 54 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.33
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any idea how to fix this? Thanks in advance.
If anybody is wondering how I fixed it: add Crypt32.lib and ws2_32.lib to additional dependencies (Linker > Input).
You're not linking the windows sockets import lib. Their library won't pull it in for you. It needs to be added to your linker-dependencies as well. It looks like their library is actually a static lib that expects your program to be linked as a MT DLL.
Add ws2_32.lib to your library list on your linker settings configuration (where you added your 3rd-party library).
It looks like you need to link to Ws2_32.lib which is the import library winsock.
I try to compile simple application on Qt5 (Windows 7) using 7z.dll. I use code samples from 7zip Client7z example, but i get next errors:
mainwindow.obj : error LNK2019: unresolved external symbol __imp__SysAllocString#4 referenced in function "long __cdecl StringToBstr(wchar_t const *,wchar_t * *)" (?StringToBstr##YAJPB_WPAPA_W#Z)
mainwindow.obj : error LNK2019: unresolved external symbol "class CStringBase<wchar_t> __cdecl ConvertPropVariantToString(struct tagPROPVARIANT const &)" (?ConvertPropVariantToString##YA?AV?$CStringBase#_W##ABUtagPROPVARIANT###Z) referenced in function "private: void __thiscall MainWindow::getArchiveContent(class QString const &)" (?getArchiveContent#MainWindow##AAEXABVQString###Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: long __thiscall NWindows::NCOM::CPropVariant::Clear(void)" (?Clear#CPropVariant#NCOM#NWindows##QAEJXZ) referenced in function "public: __thiscall NWindows::NCOM::CPropVariant::~CPropVariant(void)" (??1CPropVariant#NCOM#NWindows##QAE#XZ)
mainwindow.obj : error LNK2019: unresolved external symbol "public: bool __thiscall NWindows::NFile::NIO::CInFile::Open(wchar_t const *)" (?Open#CInFile#NIO#NFile#NWindows##QAE_NPB_W#Z) referenced in function "public: bool __thiscall CInFileStream::Open(wchar_t const *)" (?Open#CInFileStream##QAE_NPB_W#Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::Read(void *,unsigned int,unsigned int *)" (?Read#CInFileStream##UAGJPAXIPAI#Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::Seek(__int64,unsigned int,unsigned __int64 *)" (?Seek#CInFileStream##UAGJ_JIPA_K#Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::GetSize(unsigned __int64 *)" (?GetSize#CInFileStream##UAGJPA_K#Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CInFileStream::~CInFileStream(void)" (??1CInFileStream##UAE#XZ) referenced in function "public: virtual void * __thiscall CInFileStream::`scalar deleting destructor'(unsigned int)" (??_GCInFileStream##UAEPAXI#Z)
debug\archive.exe : fatal error LNK1120: 8 unresolved externals
I will be grateful for any help in correcting these errors.
I was given an assignment to compile a 3d Max plugin in 64 bit.
Project compiles properly under 32 bits, but when I follow the instructions from here:
How to compile a 64-bit application using Visual C++ 2010 Express?
to setup compile platform to x64. The project compiles, but when Generating Code I get linker errors:
1>DllEntry.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl InitCustomControls(struct HINSTANCE__ *)" (__imp_?InitCustomControls##YAXPEAUHINSTANCE__###Z) referenced in function DllMain
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::IdentityMatrix(void)" (__imp_?IdentityMatrix#Matrix3##QEAAXXZ) referenced in function "public: __cdecl Matrix3::Matrix3(int)" (??0Matrix3##QEAA#H#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl MaxHeapOperators::operator delete(void *)" (__imp_??3MaxHeapOperators##SAXPEAX#Z) referenced in function "public: virtual void * __cdecl SceneExport::`scalar deleting destructor'(unsigned int)" (??_GSceneExport##UEAAPEAXI#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl ClassDesc2::ClassDesc2(void)" (__imp_??0ClassDesc2##QEAA#XZ) referenced in function "public: __cdecl CMaxExporterClassDesc::CMaxExporterClassDesc(void)" (??0CMaxExporterClassDesc##QEAA#XZ)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::ResetClassParams(int)" (?ResetClassParams#ClassDesc2##UEAAXH#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ClassDesc2::NumParamBlockDescs(void)" (?NumParamBlockDescs#ClassDesc2##UEAAHXZ)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class ParamBlockDesc2 * __cdecl ClassDesc2::GetParamBlockDesc(int)" (?GetParamBlockDesc#ClassDesc2##UEAAPEAVParamBlockDesc2##H#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class ParamBlockDesc2 * __cdecl ClassDesc2::GetParamBlockDescByID(short)" (?GetParamBlockDescByID#ClassDesc2##UEAAPEAVParamBlockDesc2##F#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::AddParamBlockDesc(class ParamBlockDesc2 *)" (?AddParamBlockDesc#ClassDesc2##UEAAXPEAVParamBlockDesc2###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::BeginEditParams(class IObjParam *,class ReferenceMaker *,unsigned long,class Animatable *)" (?BeginEditParams#ClassDesc2##UEAAXPEAVIObjParam##PEAVReferenceMaker##KPEAVAnimatable###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::EndEditParams(class IObjParam *,class ReferenceMaker *,unsigned long,class Animatable *)" (?EndEditParams#ClassDesc2##UEAAXPEAVIObjParam##PEAVReferenceMaker##KPEAVAnimatable###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::InvalidateUI(class ParamBlockDesc2 *)" (?InvalidateUI#ClassDesc2##UEAAXPEAVParamBlockDesc2###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual char * __cdecl ClassDesc::GetRsrcString(__int64)" (?GetRsrcString#ClassDesc##UEAAPEAD_J#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::MakeAutoParamBlocks(class ReferenceMaker *)" (?MakeAutoParamBlocks#ClassDesc2##UEAAXPEAVReferenceMaker###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ClassDesc2::NumParamMaps(void)" (?NumParamMaps#ClassDesc2##UEAAHXZ)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class IParamMap2 * __cdecl ClassDesc2::GetParamMap(int)" (?GetParamMap#ClassDesc2##UEAAPEAVIParamMap2##H#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(char *)" (?GetInterface#ClassDesc##UEAAPEAVFPInterface##PEAD#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(class Interface_ID)" (?GetInterface#ClassDesc##UEAAPEAVFPInterface##VInterface_ID###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc::AddInterface(class FPInterface *)" (?AddInterface#ClassDesc##UEAAXPEAVFPInterface###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl ClassDesc2::SetUserDlgProc(class ParamBlockDesc2 *,short,class ParamMap2UserDlgProc *)" (__imp_?SetUserDlgProc#ClassDesc2##QEAAXPEAVParamBlockDesc2##FPEAVParamMap2UserDlgProc###Z) referenced in function "public: virtual void __cdecl ClassDesc2::SetUserDlgProc(class ParamBlockDesc2 *,class ParamMap2UserDlgProc *)" (?SetUserDlgProc#ClassDesc2##UEAAXPEAVParamBlockDesc2##PEAVParamMap2UserDlgProc###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl ClassDesc2::~ClassDesc2(void)" (__imp_??1ClassDesc2##UEAA#XZ) referenced in function "public: virtual __cdecl CMaxExporterClassDesc::~CMaxExporterClassDesc(void)" (??1CMaxExporterClassDesc##UEAA#XZ)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl zfree(void * *)" (__imp_?zfree##YAXPEAPEAX#Z) referenced in function "public: __cdecl Tab<class Point3>::~Tab<class Point3>(void)" (??1?$Tab#VPoint3####QEAA#XZ)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl TBSetCount(struct TabHdr * *,int,int,int)" (__imp_?TBSetCount##YAXPEAPEAUTabHdr##HHH#Z) referenced in function "public: void __cdecl Tab<class Point3>::SetCount(int,int)" (?SetCount#?$Tab#VPoint3####QEAAXHH#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Point3 __cdecl Normalize(class Point3 const &)" (__imp_?Normalize##YA?AVPoint3##AEBV1##Z) referenced in function "public: void __cdecl VNormal::Normalize(void)" (?Normalize#VNormal##QEAAXXZ)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TVFace * __cdecl Mesh::mapFaces(int)const " (__imp_?mapFaces#Mesh##QEBAPEAVTVFace##H#Z) referenced in function "protected: void __cdecl CMaxExporter::ExportColors(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportColors#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Point3 * __cdecl Mesh::mapVerts(int)const " (__imp_?mapVerts#Mesh##QEBAPEAVPoint3##H#Z) referenced in function "protected: void __cdecl CMaxExporter::ExportColors(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportColors#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Point3 __cdecl operator*(class Point3 const &,class Matrix3 const &)" (__imp_??D#YA?AVPoint3##AEBV0#AEBVMatrix3###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ApplyScaling(class Matrix3 &,class ScaleValue const &)" (__imp_?ApplyScaling##YAXAEAVMatrix3##AEBVScaleValue###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl PreRotateMatrix(class Matrix3 &,class Quat const &)" (__imp_?PreRotateMatrix##YAXAEAVMatrix3##AEBVQuat###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::PreTranslate(class Point3 const &)" (__imp_?PreTranslate#Matrix3##QEAAXAEBVPoint3###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::SetRow(int,class Point3)" (__imp_?SetRow#Matrix3##QEAAXHVPoint3###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportNormalsTangents(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportNormalsTangents#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Point3 __cdecl Point3::operator^(class Point3 const &)const " (__imp_??TPoint3##QEBA?AV0#AEBV0##Z) referenced in function "protected: void __cdecl CMaxExporter::ExportNormalsTangents(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportNormalsTangents#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl CStr::operator char *(void)" (__imp_??BCStr##QEAAPEADXZ) referenced in function "protected: void __cdecl CMaxExporter::Log(char const *,struct pmesh::mesh_file &)" (?Log#CMaxExporter##IEAAXPEBDAEAUmesh_file#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void * __cdecl MaxHeapOperators::operator new(unsigned __int64)" (__imp_??2MaxHeapOperators##SAPEAX_K#Z) referenced in function "public: virtual void * __cdecl CMaxExporterClassDesc::Create(int)" (?Create#CMaxExporterClassDesc##UEAAPEAXH#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Mesh::~Mesh(void)" (__imp_??1Mesh##UEAA#XZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl Matrix3::Parity(void)const " (__imp_?Parity#Matrix3##QEBAHXZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl Mesh::Mesh(class Mesh const &)" (__imp_??0Mesh##QEAA#AEBV0##Z) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl DebugPrint(char const *,...)" (__imp_?DebugPrint##YAXPEBDZZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
What am I doing wrong?
As a follow-up for anybody having the same problem: You need to select x64 variant of the libraries at the Linker->General->AdditionalLibraryDirectories. Once you install 3Ds MAX SDK with the default options you should have them located at: C:\Program Files (x86)\Autodesk\maxsdk\x64\lib;