Fixing unresolved external symbol error in C++ - c++

When I try to build my C++ application, I get a lot of unresolved external errors:
1>game.obj : error LNK2019: unresolved external symbol "public: __thiscall Player::Player(void)" (??0Player##QAE#XZ) referenced in function "public: __thiscall Game::Game(void)" (??0Game##QAE#XZ)
1>game.obj : error LNK2019: unresolved external symbol "public: __thiscall Player::Player(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0Player##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: void __thiscall Game::newMonster(void)" (?newMonster#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Player::gameOver(void)" (?gameOver#Player##QAE_NXZ) referenced in function "public: void __thiscall Game::defaultMenu(void)" (?defaultMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::updatePet(int,class Pet *)" (?updatePet#Player##QAEXHPAVPet###Z) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Player::enemyName(void)" (?enemyName#Player##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: class Pet * __thiscall Player::getMonster(int)" (?getMonster#Player##QAEPAVPet##H#Z) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: int __thiscall Player::getMonsterSize(void)" (?getMonsterSize#Player##QAEHXZ) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Player::getName(void)" (?getName#Player##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) referenced in function "public: void __thiscall Game::saveMonster(void)" (?saveMonster#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::addMonster(class Pet *)" (?addMonster#Player##QAEXPAVPet###Z) referenced in function "public: void __thiscall Game::loadMonster(void)" (?loadMonster#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::setName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?setName#Player##QAEXV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: void __thiscall Game::loadMonster(void)" (?loadMonster#Game##QAEXXZ)
1>fatal error LNK1120: 10 unresolved externals
The thing is, these errors didn't show up a couple days ago. They just appeared suddenly out of nowhere.
I also have included my Player.h inside the Player.cpp and Game.cpp where it should be needed.
Can anyone help me here?

Related

Can't get Google Protobuf linking properly in VS2015

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.

How to solve error : LNK2019: unresolved external symbol "public"?

I want to make a plugin for a software. In order to make the plugin, I should make a .dll file but I have faced many challenges about making it. My system is Windows 7 and I'm using Microsoft Visual Studio 2010 as an IDE. I made a dll project and made two source files, one header file and then I built the solution but I encountered the following errors.
Note : before building the solution, I added the path of include and lib directories of the software.
1> Creating library C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.lib and object C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.exp
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FECoreFactory::~FECoreFactory(void)" (??1FECoreFactory##UAE#XZ) referenced in function __
1>dllmain.obj : error LNK2019: unresolved external symbol "public: void __thiscall FECoreKernel::RegisterClass(class FECoreFactory *)" (?RegisterClass#FECoreKernel##QAEXPAVFECoreFactory###Z) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T#VFENeoHookeanPI####QAE#IPBD#Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: static class FECoreKernel & __cdecl FECoreKernel::GetInstance(void)" (?GetInstance#FECoreKernel##SAAAV1#XZ) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T#VFENeoHookeanPI####QAE#IPBD#Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FECoreFactory::FECoreFactory(unsigned int,char const *)" (??0FECoreFactory##QAE#IPBD#Z) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T#VFENeoHookeanPI####QAE#IPBD#Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterial::FEElasticMaterial(class FEModel *)" (??0FEElasticMaterial##QAE#PAVFEModel###Z) referenced in function "public: __thiscall FENeoHookeanPI::FENeoHookeanPI(class FEModel *)" (??0FENeoHookeanPI##QAE#PAVFEModel###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FEMaterial::GetParameter(class ParamString const &)" (?GetParameter#FEMaterial##UAEPAVFEParam##ABVParamString###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEMaterial::Serialize(class DumpFile &)" (?Serialize#FEMaterial##UAEXAAVDumpFile###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEElasticMaterial::SetAttribute(char const *,char const *)" (?SetAttribute#FEElasticMaterial##UAE_NPBD0#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEElasticMaterial::SetAttribute(char const *,char const *)" (?SetAttribute#FEElasticMaterial##UAE_NPBD0#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::Properties(void)" (?Properties#FEMaterial##UAEHXZ)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FECoreBase * __thiscall FEMaterial::GetProperty(int)" (?GetProperty#FEMaterial##UAEPAVFECoreBase##H#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::FindPropertyIndex(char const *)" (?FindPropertyIndex#FEMaterial##UAEHPBD#Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEMaterial::SetProperty(int,class FECoreBase *)" (?SetProperty#FEMaterial##UAE_NHPAVFECoreBase###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FESolidMaterial::Density(void)" (?Density#FESolidMaterial##UAENXZ)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::SetLocalCoordinateSystem(class FEElement &,int,class FEMaterialPoint &)" (?SetLocalCoordinateSystem#FEElasticMaterial##UAEXAAVFEElement##HAAVFEMaterialPoint###Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FEElasticMaterial::StrainEnergyDensity(class FEMaterialPoint &)" (?StrainEnergyDensity#FEElasticMaterial##UAENAAVFEMaterialPoint###Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterialPoint::FEElasticMaterialPoint(void)" (??0FEElasticMaterialPoint##QAE#XZ) referenced in function "public: virtual class FEMaterialPoint * __thiscall FEElasticMaterial::CreateMaterialPointData(void)" (?CreateMaterialPointData#FEElasticMaterial##UAEPAVFEMaterialPoint##XZ)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FEElasticMaterial::~FEElasticMaterial(void)" (??1FEElasticMaterial##UAE#XZ) referenced in function "public: virtual __thiscall FENeoHookeanPI::~FENeoHookeanPI(void)" (??1FENeoHookeanPI##UAE#XZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: void __thiscall FEParamContainer::AddParameter(void *,enum FEParamType,int,class RANGE,char const *)" (?AddParameter#FEParamContainer##IAEXPAXW4FEParamType##HVRANGE##PBD#Z) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList#FENeoHookeanPI##MAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: virtual void __thiscall FESolidMaterial::BuildParamList(void)" (?BuildParamList#FESolidMaterial##MAEXXZ) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList#FENeoHookeanPI##MAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::Init(void)" (?Init#FEElasticMaterial##UAEXXZ) referenced in function "public: virtual void __thiscall FENeoHookeanPI::Init(void)" (?Init#FENeoHookeanPI##UAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: class mat3ds __thiscall FEElasticMaterialPoint::LeftCauchyGreen(void)" (?LeftCauchyGreen#FEElasticMaterialPoint##QAE?AVmat3ds##XZ) referenced in function "public: virtual class mat3ds __thiscall FENeoHookeanPI::Stress(class FEMaterialPoint &)" (?Stress#FENeoHookeanPI##UAE?AVmat3ds##AAVFEMaterialPoint###Z)
1>C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.dll : fatal error LNK1120: 21 unresolved externals
1>
1>Build FAILED
How can I solve these errors ?
In addition to adding the library path to the project setting be sure you also add the required library files(.lib) as an additional dependency for the linker. you can find the additional dependency input field at project->properties->linker->Input and add the actual names(with extension) of the library files separated by a space.

BulletPhysics Linker Error for VS2010 , for sample project

Like any other BulletPhysics app, my VS2010 project refers to three other projects : BulletDynamics , Bullet3Collision and LinearMath.
It is a simple BulletPhysics test project, I tried multiple options but none of them seem to work :
Individual projects (BulletDynamics , Bullet3Collision and LinearMath) -> properties -> Librarian -> Link Library dependencies.
BulletTestProject -> Properties -> Common Properties -> Framework and References -> Added above three projects with Link Library dependencies true.
BulletTestProject -> Properties -> Configuration Properties -> Linker -> Add additional Libraries & -> Input -> Add aditional dependencies.
Tried above three but none seem to work.
Any help is appreciated to fix the linker error.
Edit :
Follwing
4>BulletHelloWorld.obj : error LNK2019: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher##QAE#PAVbtCollisionConfiguration###Z) referenced in function _main
4>BulletHelloWorld.obj : error LNK2019: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration##QAE#ABUbtDefaultCollisionConstructionInfo###Z) referenced in function _main
4>BulletHelloWorld.obj : error LNK2019: unresolved external symbol "public: __thiscall btDbvtBroadphase::btDbvtBroadphase(class btOverlappingPairCache *)" (??0btDbvtBroadphase##QAE#PAVbtOverlappingPairCache###Z) referenced in function _main
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: __thiscall btCollisionWorld::btCollisionWorld(class btDispatcher *,class btBroadphaseInterface *,class btCollisionConfiguration *)" (??0btCollisionWorld##QAE#PAVbtDispatcher##PAVbtBroadphaseInterface##PAVbtCollisionConfiguration###Z) referenced in function "public: __thiscall btDynamicsWorld::btDynamicsWorld(class btDispatcher *,class btBroadphaseInterface *,class btCollisionConfiguration *)" (??0btDynamicsWorld##QAE#PAVbtDispatcher##PAVbtBroadphaseInterface##PAVbtCollisionConfiguration###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::updateAabbs(void)" (?updateAabbs#btCollisionWorld##UAEXXZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::computeOverlappingPairs(void)" (?computeOverlappingPairs#btCollisionWorld##UAEXXZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::debugDrawObject(class btTransform const &,class btCollisionShape const *,class btVector3 const &)" (?debugDrawObject#btCollisionWorld##UAEXABVbtTransform##PBVbtCollisionShape##ABVbtVector3###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::rayTest(class btVector3 const &,class btVector3 const &,struct btCollisionWorld::RayResultCallback &)const " (?rayTest#btCollisionWorld##UBEXABVbtVector3##0AAURayResultCallback#1##Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::addCollisionObject(class btCollisionObject *,short,short)" (?addCollisionObject#btCollisionWorld##UAEXPAVbtCollisionObject##FF#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::removeCollisionObject(class btCollisionObject *)" (?removeCollisionObject#btCollisionWorld##UAEXPAVbtCollisionObject###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::performDiscreteCollisionDetection(void)" (?performDiscreteCollisionDetection#btCollisionWorld##UAEXXZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::serialize(class btSerializer *)" (?serialize#btCollisionWorld##UAEXPAVbtSerializer###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall btCollisionWorld::~btCollisionWorld(void)" (??1btCollisionWorld##UAE#XZ) referenced in function "public: virtual __thiscall btDynamicsWorld::~btDynamicsWorld(void)" (??1btDynamicsWorld##UAE#XZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: void __thiscall btCollisionObject::setActivationState(int)const " (?setActivationState#btCollisionObject##QBEXH#Z) referenced in function "public: void __thiscall btRigidBody::updateDeactivation(float)" (?updateDeactivation#btRigidBody##QAEXM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall btConvexShape::~btConvexShape(void)" (??1btConvexShape##UAE#XZ) referenced in function "public: virtual __thiscall btConvexInternalShape::~btConvexInternalShape(void)" (??1btConvexInternalShape##UAE#XZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere#btCollisionShape##UBEXAAVbtVector3##AAM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc#btCollisionShape##UBEMXZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold#btCollisionShape##UBEMM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling#btConvexInternalShape##UAEXABVbtVector3###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape#btCollisionShape##UBEXPAVbtSerializer###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex#btConvexInternalShape##UBE?AVbtVector3##ABV2##Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexShape::project(class btTransform const &,class btVector3 const &,float &,float &)const " (?project#btConvexShape##UBEXABVbtTransform##ABVbtVector3##AAM2#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow#btConvexInternalShape##UBEXABVbtTransform##AAVbtVector3##1#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize#btCollisionShape##UBEPBDPAXPAVbtSerializer###Z) referenced in function "public: virtual char const * __thiscall btConvexInternalShape::serialize(void *,class btSerializer *)const " (?serialize#btConvexInternalShape##UBEPBDPAXPAVbtSerializer###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "protected: __thiscall btConvexInternalShape::btConvexInternalShape(void)" (??0btConvexInternalShape##IAE#XZ) referenced in function "public: __thiscall btSphereShape::btSphereShape(float)" (??0btSphereShape##QAE#M#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb#btSphereShape##UBEXABVbtTransform##AAVbtVector3##1#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia#btSphereShape##UBEXMAAVbtVector3###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex#btSphereShape##UBE?AVbtVector3##ABV2##Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertexWithoutMargin(class btVector3 const &)const " (?localGetSupportingVertexWithoutMargin#btSphereShape##UBE?AVbtVector3##ABV2##Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(class btVector3 const *,class btVector3 *,int)const " (?batchedUnitVectorGetSupportingVertexWithoutMargin#btSphereShape##UBEXPBVbtVector3##PAV2#H#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: static float __cdecl btManifoldResult::calculateCombinedRestitution(class btCollisionObject const *,class btCollisionObject const *)" (?calculateCombinedRestitution#btManifoldResult##SAMPBVbtCollisionObject##0#Z) referenced in function "protected: virtual void __thiscall btDiscreteDynamicsWorld::integrateTransforms(float)" (?integrateTransforms#btDiscreteDynamicsWorld##MAEXM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: void __thiscall btCollisionWorld::convexSweepTest(class btConvexShape const *,class btTransform const &,class btTransform const &,struct btCollisionWorld::ConvexResultCallback &,float)const " (?convexSweepTest#btCollisionWorld##QBEXPBVbtConvexShape##ABVbtTransform##1AAUConvexResultCallback#1#M#Z) referenced in function "protected: virtual void __thiscall btDiscreteDynamicsWorld::integrateTransforms(float)" (?integrateTransforms#btDiscreteDynamicsWorld##MAEXM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall btCollisionWorld::serializeCollisionObjects(class btSerializer *)" (?serializeCollisionObjects#btCollisionWorld##IAEXPAVbtSerializer###Z) referenced in function "public: virtual void __thiscall btDiscreteDynamicsWorld::serialize(class btSerializer *)" (?serialize#btDiscreteDynamicsWorld##UAEXPAVbtSerializer###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: virtual void __thiscall btCollisionWorld::debugDrawWorld(void)" (?debugDrawWorld#btCollisionWorld##UAEXXZ) referenced in function "public: virtual void __thiscall btDiscreteDynamicsWorld::debugDrawWorld(void)" (?debugDrawWorld#btDiscreteDynamicsWorld##UAEXXZ)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: __thiscall btSimulationIslandManager::btSimulationIslandManager(void)" (??0btSimulationIslandManager##QAE#XZ) referenced in function "public: __thiscall btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(class btDispatcher *,class btBroadphaseInterface *,class btConstraintSolver *,class btCollisionConfiguration *)" (??0btDiscreteDynamicsWorld##QAE#PAVbtDispatcher##PAVbtBroadphaseInterface##PAVbtConstraintSolver##PAVbtCollisionConfiguration###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: void __thiscall btSimulationIslandManager::buildAndProcessIslands(class btDispatcher *,class btCollisionWorld *,struct btSimulationIslandManager::IslandCallback *)" (?buildAndProcessIslands#btSimulationIslandManager##QAEXPAVbtDispatcher##PAVbtCollisionWorld##PAUIslandCallback#1##Z) referenced in function "protected: virtual void __thiscall btDiscreteDynamicsWorld::solveConstraints(struct btContactSolverInfo &)" (?solveConstraints#btDiscreteDynamicsWorld##MAEXAAUbtContactSolverInfo###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: static float __cdecl btManifoldResult::calculateCombinedFriction(class btCollisionObject const *,class btCollisionObject const *)" (?calculateCombinedFriction#btManifoldResult##SAMPBVbtCollisionObject##0#Z) referenced in function "protected: void __thiscall btDiscreteDynamicsWorld::createPredictiveContacts(float)" (?createPredictiveContacts#btDiscreteDynamicsWorld##IAEXM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btDiscreteDynamicsWorld.obj) : error LNK2019: unresolved external symbol "public: int __thiscall btPersistentManifold::addManifoldPoint(class btManifoldPoint const &,bool)" (?addManifoldPoint#btPersistentManifold##QAEHABVbtManifoldPoint##_N#Z) referenced in function "protected: void __thiscall btDiscreteDynamicsWorld::createPredictiveContacts(float)" (?createPredictiveContacts#btDiscreteDynamicsWorld##IAEXM#Z)
4>BulletDynamics_RelWithDebugInfo.lib(btRigidBody.obj) : error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionObject::serialize(void *,class btSerializer *)const " (?serialize#btCollisionObject##UBEPBDPAXPAVbtSerializer###Z) referenced in function "public: virtual char const * __thiscall btRigidBody::serialize(void *,class btSerializer *)const " (?serialize#btRigidBody##UBEPBDPAXPAVbtSerializer###Z)
4>BulletDynamics_RelWithDebugInfo.lib(btRigidBody.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall btCollisionObject::~btCollisionObject(void)" (??1btCollisionObject##UAE#XZ) referenced in function __unwindfunclet$??0btRigidBody##QAE#ABUbtRigidBodyConstructionInfo#0##Z$0
4>BulletDynamics_RelWithDebugInfo.lib(btTypedConstraint.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall btCollisionObject::~btCollisionObject(void)" (??1btCollisionObject##UAE#XZ)
4>BulletDynamics_RelWithDebugInfo.lib(btRigidBody.obj) : error LNK2019: unresolved external symbol "public: __thiscall btCollisionObject::btCollisionObject(void)" (??0btCollisionObject##QAE#XZ) referenced in function "public: __thiscall btRigidBody::btRigidBody(struct btRigidBody::btRigidBodyConstructionInfo const &)" (??0btRigidBody##QAE#ABUbtRigidBodyConstructionInfo#0##Z)
4>C:\Users\jay\documents\visual studio 2010\Projects\BulletTest\Debug\BulletTest.exe : fatal error LNK1120: 41 unresolved externals
========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========

Working With SFML, getting "Unresolved External Symbol" Output

So I'm making a pong clone, and I'm currently compiling it with the following output:
1>------ Build started: Project: Pong, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Image::Create(unsigned int,unsigned int,class sf::Color const &)" (__imp_?Create#Image#sf##QAEXIIABVColor#2##Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources#Display##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color#sf##QAE#EEEE#Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources#Display##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class sf::Rect<int> const &)" (__imp_?LoadFromFile#Texture#sf##QAE_NABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABV?$Rect#H#2##Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources#Display##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Font::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?LoadFromFile#Font#sf##QAE_NABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources#Display##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::SetTexture(class sf::Texture const &,bool)" (__imp_?SetTexture#Sprite#sf##QAEXABVTexture#2#_N#Z) referenced in function "public: void __thiscall Display::loadSprites(void)" (?loadSprites#Display##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sprite::~Sprite(void)" (__imp_??1Sprite#sf##UAE#XZ) referenced in function "public: void __thiscall Ball::setSprite(class sf::Sprite)" (?setSprite#Ball##QAEXVSprite#sf###Z)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Sprite & __thiscall sf::Sprite::operator=(class sf::Sprite const &)" (__imp_??4Sprite#sf##QAEAAV01#ABV01##Z) referenced in function "public: void __thiscall Ball::setSprite(class sf::Sprite)" (?setSprite#Ball##QAEXVSprite#sf###Z)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(void)" (__imp_??0Sprite#sf##QAE#XZ) referenced in function "public: __thiscall Ball::Ball(void)" (??0Ball##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Transformable::SetPosition(float,float)" (__imp_?SetPosition#Transformable#sf##QAEXMM#Z) referenced in function "public: void __thiscall Ball::updateSprite(void)" (?updateSprite#Ball##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::~Image(void)" (__imp_??1Image#sf##QAE#XZ) referenced in function __unwindfunclet$??0Display##QAE#XZ$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture#sf##QAE#XZ) referenced in function __unwindfunclet$??0Display##QAE#XZ$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Font::~Font(void)" (__imp_??1Font#sf##QAE#XZ) referenced in function __unwindfunclet$??0Display##QAE#XZ$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::Image(void)" (__imp_??0Image#sf##QAE#XZ) referenced in function "public: __thiscall Display::Display(void)" (??0Display##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" (__imp_??0Texture#sf##QAE#XZ) referenced in function "public: __thiscall Display::Display(void)" (??0Display##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Font::Font(void)" (__imp_??0Font#sf##QAE#XZ) referenced in function "public: __thiscall Display::Display(void)" (??0Display##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(class sf::Sprite const &)" (__imp_??0Sprite#sf##QAE#ABV01##Z) referenced in function "public: void __thiscall Game::reset(void)" (?reset#Game##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl sf::Keyboard::IsKeyPressed(enum sf::Keyboard::Key)" (__imp_?IsKeyPressed#Keyboard#sf##SA_NW4Key#12##Z) referenced in function "public: void __thiscall Game::update(void)" (?update#Game##QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window#sf##UAE#XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" (__imp_?Close#Window#sf##QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display#Window#sf##QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0Window#sf##QAE#VVideoMode#1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##IABUContextSettings#1##Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode#sf##QAE#III#Z) referenced in function _main
1>C:\Users\Owner\Documents\Visual Studio 2010\Projects\Pong\Debug\Pong.exe : fatal error LNK1120: 22 unresolved externals
All I've read says I'm linking incorrectly, but I have all the files I should need in the include section... What am I doing wrong?
If you are linking the static SFML libraries you need to define SFML_STATIC in the preprocessor section of your project configuration.
If you do not do this you will get __declspec(dllimport) related linking errors as the headers no longer match the libraries they were built with.

Issue arrives when integrating Antlr with Visual Studio C++ 2010 of "error LNK2001: unresolved external symbol"

MainLexer.h in ‘Checker’ Project of static Library
class MainLexerFuncs
{
private:
static int run();
public:
static int start();
};
MainLexer.cpp in Checker Project of static Library which is using third party antlr tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages.
#include “iostream”
using namespace std;
#include "HTMLLexer.hpp"
#include "HTMLParser.hpp"
#include "antlr/TokenBuffer.hpp"
#include "MainLexerLib.h"
#include “stdexcept”
using namespace std;
int MainLexerFuncs::run()
{
ANTLR_USING_NAMESPACE(std)
ANTLR_USING_NAMESPACE(antlr)
try {
HTMLLexer lexer(cin);
TokenBuffer buffer(lexer);
HTMLParser parser(buffer);
parser.document();
}
catch( ANTLRException& e )
{
cerr << "exception: " << e.getMessage() << endl;
return -1;
}
catch( exception& e )
{
cerr << "exception: " << e.what() << endl;
return -1;
}
cout<<"yes";
return 0;
}
int MainLexerFuncs::start(){
return MainLexerFuncs::run();
}
mainlexer.cpp in ‘MainChecker’ Project of Window Console Application in the same solution where Checker Projectc exists.
#include "iostream"
using namespace std;
#include "MainLexerLib.h"
int main( int, char** )
{
MainLexerFuncs::start();
return 0;
}
MainCheker is the windows console application which is using static library of Checker.lib that contains the file of MainLexer.h and MainLexer.cpp.
But when I run MainChecker then following error arrives:
1>------ Build started: Project: mainlexer, Configuration: Debug Win32 ------
1> mainlexer.cpp
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall antlr::TokenBuffer::~TokenBuffer(void)" (??1TokenBuffer#antlr##UAE#XZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::TokenBuffer::TokenBuffer(class antlr::TokenStream &)" (??0TokenBuffer#antlr##QAE#AAVTokenStream#1##Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::consume(void)" (?consume#CharScanner#antlr##UAEXXZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::consume(void)" (?consume#CharScanner#antlr##UAEXXZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::panic(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?panic#CharScanner#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::panic(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?panic#CharScanner#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::panic(void)" (?panic#CharScanner#antlr##UAEXXZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::panic(void)" (?panic#CharScanner#antlr##UAEXXZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::reportError(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?reportError#CharScanner#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::reportError(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?reportError#CharScanner#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::reportError(class antlr::RecognitionException const &)" (?reportError#CharScanner#antlr##UAEXABVRecognitionException#2##Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::reportError(class antlr::RecognitionException const &)" (?reportError#CharScanner#antlr##UAEXABVRecognitionException#2##Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::reportWarning(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?reportWarning#CharScanner#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::reportWarning(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?reportWarning#CharScanner#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::traceIndent(void)" (?traceIndent#CharScanner#antlr##UAEXXZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::traceIndent(void)" (?traceIndent#CharScanner#antlr##UAEXXZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::traceIn(char const *)" (?traceIn#CharScanner#antlr##UAEXPBD#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::traceIn(char const *)" (?traceIn#CharScanner#antlr##UAEXPBD#Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::traceOut(char const *)" (?traceOut#CharScanner#antlr##UAEXPBD#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::CharScanner::traceOut(char const *)" (?traceOut#CharScanner#antlr##UAEXPBD#Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall antlr::BitSet::member(unsigned int)const " (?member#BitSet#antlr##QBE_NI#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall antlr::BitSet::member(unsigned int)const " (?member#BitSet#antlr##QBE_NI#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall antlr::BitSet::member(unsigned int)const " (?member#BitSet#antlr##QBE_NI#Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::MismatchedCharException::MismatchedCharException(int,int,bool,class antlr::CharScanner *)" (??0MismatchedCharException#antlr##QAE#HH_NPAVCharScanner#1##Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::MismatchedCharException::MismatchedCharException(int,int,bool,class antlr::CharScanner *)" (??0MismatchedCharException#antlr##QAE#HH_NPAVCharScanner#1##Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::BitSet::~BitSet(void)" (??1BitSet#antlr##QAE#XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::BitSet::~BitSet(void)" (??1BitSet#antlr##QAE#XZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::BitSet::~BitSet(void)" (??1BitSet#antlr##QAE#XZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::RecognitionException::toString(void)const " (?toString#RecognitionException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::RecognitionException::toString(void)const " (?toString#RecognitionException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::RecognitionException::toString(void)const " (?toString#RecognitionException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::MismatchedCharException::getMessage(void)const " (?getMessage#MismatchedCharException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::MismatchedCharException::getMessage(void)const " (?getMessage#MismatchedCharException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::RecognitionException::getFileLineColumnString(void)const " (?getFileLineColumnString#RecognitionException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::RecognitionException::getFileLineColumnString(void)const " (?getFileLineColumnString#RecognitionException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::RecognitionException::getFileLineColumnString(void)const " (?getFileLineColumnString#RecognitionException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::MismatchedCharException::MismatchedCharException(int,class antlr::BitSet,bool,class antlr::CharScanner *)" (??0MismatchedCharException#antlr##QAE#HVBitSet#1#_NPAVCharScanner#1##Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::MismatchedCharException::MismatchedCharException(int,class antlr::BitSet,bool,class antlr::CharScanner *)" (??0MismatchedCharException#antlr##QAE#HVBitSet#1#_NPAVCharScanner#1##Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::MismatchedCharException::MismatchedCharException(int,int,int,bool,class antlr::CharScanner *)" (??0MismatchedCharException#antlr##QAE#HHH_NPAVCharScanner#1##Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::MismatchedCharException::MismatchedCharException(int,int,int,bool,class antlr::CharScanner *)" (??0MismatchedCharException#antlr##QAE#HHH_NPAVCharScanner#1##Z)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall antlr::Parser::~Parser(void)" (??1Parser#antlr##UAE#XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall antlr::Parser::~Parser(void)" (??1Parser#antlr##UAE#XZ)
1>CheckLexer.lib(MainLexerLib.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::ASTRef::~ASTRef(void)" (??1ASTRef#antlr##QAE#XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::ASTRef::~ASTRef(void)" (??1ASTRef#antlr##QAE#XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::LLkParser::LLkParser(class antlr::TokenBuffer &,int)" (??0LLkParser#antlr##QAE#AAVTokenBuffer#1#H#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::consumeUntil(class antlr::BitSet const &)" (?consumeUntil#Parser#antlr##UAEXABVBitSet#2##Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::consumeUntil(int)" (?consumeUntil#Parser#antlr##UAEXH#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::match(class antlr::BitSet const &)" (?match#Parser#antlr##UAEXABVBitSet#2##Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::match(int)" (?match#Parser#antlr##UAEXH#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::matchNot(int)" (?matchNot#Parser#antlr##UAEXH#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::reportError(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?reportError#Parser#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::reportError(class antlr::RecognitionException const &)" (?reportError#Parser#antlr##UAEXABVRecognitionException#2##Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::reportWarning(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?reportWarning#Parser#antlr##UAEXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::panic(void)" (?panic#Parser#antlr##UAEXXZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::Parser::traceIndent(void)" (?traceIndent#Parser#antlr##UAEXXZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::LLkParser::traceIn(char const *)" (?traceIn#LLkParser#antlr##UAEXPBD#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall antlr::LLkParser::traceOut(char const *)" (?traceOut#LLkParser#antlr##UAEXPBD#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: unsigned int __thiscall antlr::TokenBuffer::mark(void)" (?mark#TokenBuffer#antlr##QAEIXZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: void __thiscall antlr::TokenBuffer::rewind(unsigned int)" (?rewind#TokenBuffer#antlr##QAEXI#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: int __thiscall antlr::TokenBuffer::LA(unsigned int)" (?LA#TokenBuffer#antlr##QAEHI#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: class antlr::RefCount<class antlr::Token> __thiscall antlr::TokenBuffer::LT(unsigned int)" (?LT#TokenBuffer#antlr##QAE?AV?$RefCount#VToken#antlr###2#I#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::LLkParser::LLkParser(class antlr::TokenStream &,int)" (??0LLkParser#antlr##QAE#AAVTokenStream#1#H#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::LLkParser::LLkParser(class antlr::RefCount<class antlr::ParserInputState> const &,int)" (??0LLkParser#antlr##QAE#ABV?$RefCount#VParserInputState#antlr###1#H#Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::NoViableAltException::NoViableAltException(class antlr::RefCount<class antlr::Token>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0NoViableAltException#antlr##QAE#V?$RefCount#VToken#antlr###1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::NoViableAltException::getMessage(void)const " (?getMessage#NoViableAltException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: static struct antlr::ASTRef * __cdecl antlr::ASTRef::getRef(class antlr::AST const *)" (?getRef#ASTRef#antlr##SAPAU12#PBVAST#2##Z)
1>CheckLexer.lib(HTMLParser.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::BitSet::BitSet(unsigned long const *,unsigned int)" (??0BitSet#antlr##QAE#PBKI#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::BitSet::BitSet(unsigned long const *,unsigned int)" (??0BitSet#antlr##QAE#PBKI#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::CharScanner::CharScanner(class antlr::InputBuffer *,bool)" (??0CharScanner#antlr##QAE#PAVInputBuffer#1#_N#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::CharBuffer::CharBuffer(class std::basic_istream<char,struct std::char_traits<char> > &)" (??0CharBuffer#antlr##QAE#AAV?$basic_istream#DU?$char_traits#D#std###std###Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::CharScanner::CharScanner(class antlr::InputBuffer &,bool)" (??0CharScanner#antlr##QAE#AAVInputBuffer#1#_N#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::CharScanner::CharScanner(class antlr::RefCount<class antlr::LexerInputState> const &,bool)" (??0CharScanner#antlr##QAE#ABV?$RefCount#VLexerInputState#antlr###1#_N#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "class antlr::RefCount<class antlr::Token> antlr::nullToken" (?nullToken#antlr##3V?$RefCount#VToken#antlr###1#A)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: __thiscall antlr::NoViableAltForCharException::NoViableAltForCharException(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int)" (??0NoViableAltForCharException#antlr##QAE#HABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##HH#Z)
1>CheckLexer.lib(HTMLLexer.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall antlr::NoViableAltForCharException::getMessage(void)const " (?getMessage#NoViableAltForCharException#antlr##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>D:\Lexer\CheckLexer\Debug\mainlexer.exe : fatal error LNK1120: 51 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
*/
Please tell me how can I resolve it? I will be thanful to you.
Building static library (CheckLexer.lib), you don't need to have all dependencies resolved - this is how static libraries are built.
But you need to resolve these used dependencies when building final binary (executable). So you need to link your executable against antlr library.
You are probably missing appropriate entry (antlr.lib?) in the 'Linker > Input > Additional Dependencies' settings for your executable project.