unresolved external linking to static Qwt build - c++

I'm trying to link to a static build of Qwt. to create the static build, I modified qwtconfig.pri to contain
#QWT_CONFIG += QwtDll
and I removed all the #define QWT_DLL references in the code.
However, when I link to the library, I get a bunch of undefined references complaining about QSvgRenderer:
15>qwt.lib(qwt_symbol.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QSvgRenderer::QSvgRenderer(class QObject *)" (__imp_??0QSvgRenderer##QEAA#PEAVQObject###Z) referenced in function "public: void __cdecl QwtSymbol::setSvgDocument(class QByteArray const &)" (?setSvgDocument#QwtSymbol##QEAAXAEBVQByteArray###Z)
15>qwt.lib(qwt_symbol.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QSvgRenderer::~QSvgRenderer(void)" (__imp_??1QSvgRenderer##UEAA#XZ) referenced in function "public: virtual void * __cdecl QSvgRenderer::`scalar deleting destructor'(unsigned int)" (??_GQSvgRenderer##UEAAPEAXI#Z)
15>qwt.lib(qwt_symbol.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl QSvgRenderer::isValid(void)const " (__imp_?isValid#QSvgRenderer##QEBA_NXZ) referenced in function "void __cdecl qwtDrawSvgSymbols(class QPainter *,class QPointF const *,int,class QSvgRenderer *,class QwtSymbol const &)" (?qwtDrawSvgSymbols##YAXPEAVQPainter##PEBVQPointF##HPEAVQSvgRenderer##AEBVQwtSymbol###Z)
15>qwt.lib(qwt_symbol.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QRectF __cdecl QSvgRenderer::viewBoxF(void)const " (__imp_?viewBoxF#QSvgRenderer##QEBA?AVQRectF##XZ) referenced in function "public: virtual class QRect __cdecl QwtSymbol::boundingRect(void)const " (?boundingRect#QwtSymbol##UEBA?AVQRect##XZ)
15>qwt.lib(qwt_symbol.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl QSvgRenderer::load(class QByteArray const &)" (__imp_?load#QSvgRenderer##QEAA_NAEBVQByteArray###Z) referenced in function "public: void __cdecl QwtSymbol::setSvgDocument(class QByteArray const &)" (?setSvgDocument#QwtSymbol##QEAAXAEBVQByteArray###Z)
15>qwt.lib(qwt_symbol.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QSvgRenderer::render(class QPainter *,class QRectF const &)" (__imp_?render#QSvgRenderer##QEAAXPEAVQPainter##AEBVQRectF###Z) referenced in function "public: void __cdecl QwtSymbol::drawSymbol(class QPainter *,class QRectF const &)const " (?drawSymbol#QwtSymbol##QEBAXPEAVQPainter##AEBVQRectF###Z)
15>qwt.lib(qwt_symbol.obj) : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl QSvgRenderer::metaObject(void)const " (?metaObject#QSvgRenderer##UEBAPEBUQMetaObject##XZ)
15>qwt.lib(qwt_symbol.obj) : error LNK2001: unresolved external symbol "public: virtual int __cdecl QSvgRenderer::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QSvgRenderer##UEAAHW4Call#QMetaObject##HPEAPEAX#Z)
15>qwt.lib(qwt_symbol.obj) : error LNK2001: unresolved external symbol "public: virtual void * __cdecl QSvgRenderer::qt_metacast(char const *)" (?qt_metacast#QSvgRenderer##UEAAPEAXPEBD#Z)
15>C:\workspace\fixQwt\executables\linkerGUI\bin\Release\linkerGUI.exe : fatal error LNK1120: 9 unresolved externals
Is there something else in the project configuration I need to do so it can link properly to QSvgRenderer?

Guess your version of Qt is without SVG support - or you forget to add it to your project dependency. If you are not interested in SVG stuff at all you could also disable it in qwtconfig.pri as well:
See: "QWT_CONFIG += QwtSvg"

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.

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 ==========

Open Scene Graph LNK2019 Error

I'm working on a C++ assignment (C++98 & VS2010) using OSG and a pre-built template project to work on. I'm trying to implement mouse picking using the osgUtil/LineSegementIntersector and osgUtil/IntersectionVisitor classes. Unfortunately when I run this code I get a bunch of LNK2001 and LNK2019 errors. The two classes are included at the top of the file, the folder with the osg libraries is included in the linker and the osgUtild.lib file is present in the directory.
The Code:
osgViewer::Viewer *pViewer=dynamic_cast<osgViewer::Viewer*>(aa.asView());
osgUtil::LineSegmentIntersector* picker;
picker = new osgUtil::LineSegmentIntersector(osgUtil::Intersector::PROJECTION, ea.getXnormalized(), ea.getYnormalized());
osgUtil::IntersectionVisitor iv(picker);
pViewer->getCamera()->accept(iv);
if(picker->containsIntersections())
{
osgUtil::LineSegmentIntersector::Intersections intersections = picker->getIntersections();
for(osgUtil::LineSegmentIntersector::Intersections::iterator it = intersections.begin(); it != intersections.end(); it++)
{
for(NodePath::const_reverse_iterator rit = it->nodePath.rbegin(); rit != it->nodePath.rend(); rit++)
{
}
}
}
The Errors:
1>raaOSGSimpleEventHandler.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall osgUtil::IntersectionVisitor::`vbase destructor'(void)" (__imp_??_DIntersectionVisitor#osgUtil##QAEXXZ) referenced in function "public: virtual bool __thiscall raaOSGSimpleEventHandler::handle(class osgGA::GUIEventAdapter const &,class osgGA::GUIActionAdapter &,class osg::Object *,class osg::NodeVisitor *)" (?handle#raaOSGSimpleEventHandler##UAE_NABVGUIEventAdapter#osgGA##AAVGUIActionAdapter#3#PAVObject#osg##PAVNodeVisitor#6##Z)
1>raaOSGSimpleEventHandler.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::multiset<struct osgUtil::LineSegmentIntersector::Intersection,struct std::less<struct osgUtil::LineSegmentIntersector::Intersection>,class std::allocator<struct osgUtil::LineSegmentIntersector::Intersection> > & __thiscall osgUtil::LineSegmentIntersector::getIntersections(void)" (__imp_?getIntersections#LineSegmentIntersector#osgUtil##QAEAAV?$multiset#UIntersection#LineSegmentIntersector#osgUtil##U?$less#UIntersection#LineSegmentIntersector#osgUtil###std##V?$allocator#UIntersection#LineSegmentIntersector#osgUtil###5##std##XZ) referenced in function "public: virtual bool __thiscall raaOSGSimpleEventHandler::handle(class osgGA::GUIEventAdapter const &,class osgGA::GUIActionAdapter &,class osg::Object *,class osg::NodeVisitor *)" (?handle#raaOSGSimpleEventHandler##UAE_NABVGUIEventAdapter#osgGA##AAVGUIActionAdapter#3#PAVObject#osg##PAVNodeVisitor#6##Z)
1>raaOSGSimpleEventHandler.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall osgUtil::IntersectionVisitor::IntersectionVisitor(class osgUtil::Intersector *,struct osgUtil::IntersectionVisitor::ReadCallback *)" (__imp_??0IntersectionVisitor#osgUtil##QAE#PAVIntersector#1#PAUReadCallback#01##Z) referenced in function "public: virtual bool __thiscall raaOSGSimpleEventHandler::handle(class osgGA::GUIEventAdapter const &,class osgGA::GUIActionAdapter &,class osg::Object *,class osg::NodeVisitor *)" (?handle#raaOSGSimpleEventHandler##UAE_NABVGUIEventAdapter#osgGA##AAVGUIActionAdapter#3#PAVObject#osg##PAVNodeVisitor#6##Z)
1>raaOSGSimpleEventHandler.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall osgUtil::LineSegmentIntersector::LineSegmentIntersector(enum osgUtil::Intersector::CoordinateFrame,double,double)" (__imp_??0LineSegmentIntersector#osgUtil##QAE#W4CoordinateFrame#Intersector#1#NN#Z) referenced in function "public: virtual bool __thiscall raaOSGSimpleEventHandler::handle(class osgGA::GUIEventAdapter const &,class osgGA::GUIActionAdapter &,class osg::Object *,class osg::NodeVisitor *)" (?handle#raaOSGSimpleEventHandler##UAE_NABVGUIEventAdapter#osgGA##AAVGUIActionAdapter#3#PAVObject#osg##PAVNodeVisitor#6##Z)
1>raaOSGSimpleEventHandler.obj : error LNK2001: unresolved external symbol "public: virtual class osgUtil::Intersector * __thiscall osgUtil::LineSegmentIntersector::clone(class osgUtil::IntersectionVisitor &)" (?clone#LineSegmentIntersector#osgUtil##UAEPAVIntersector#2#AAVIntersectionVisitor#2##Z)
1>raaOSGSimpleEventHandler.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgUtil::LineSegmentIntersector::enter(class osg::Node const &)" (?enter#LineSegmentIntersector#osgUtil##UAE_NABVNode#osg###Z)
1>raaOSGSimpleEventHandler.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgUtil::LineSegmentIntersector::leave(void)" (?leave#LineSegmentIntersector#osgUtil##UAEXXZ)
1>raaOSGSimpleEventHandler.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgUtil::LineSegmentIntersector::intersect(class osgUtil::IntersectionVisitor &,class osg::Drawable *)" (?intersect#LineSegmentIntersector#osgUtil##UAEXAAVIntersectionVisitor#2#PAVDrawable#osg###Z)
1>raaOSGSimpleEventHandler.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgUtil::LineSegmentIntersector::reset(void)" (?reset#LineSegmentIntersector#osgUtil##UAEXXZ)
1>raaOSGSimpleEventHandler.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgUtil::LineSegmentIntersector::containsIntersections(void)" (?containsIntersections#LineSegmentIntersector#osgUtil##UAE_NXZ)
1>raaOSGSimpleEventHandler.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall osgUtil::LineSegmentIntersector::~LineSegmentIntersector(void)" (__imp_??1LineSegmentIntersector#osgUtil##UAE#XZ) referenced in function "public: virtual void * __thiscall osgUtil::LineSegmentIntersector::`scalar deleting destructor'(unsigned int)" (??_GLineSegmentIntersector#osgUtil##UAEPAXI#Z)
1>D:\raaOSG(1)\raaOSG\raaOSGResource\Debug\raaOSGSimpleDemoD.exe : fatal error LNK1120: 11 unresolved externals
I can't see anything wrong with my code or my setup, my only thoughts at the moment based on everything I've read is that there's something not being included (a dll somewhere or similar) by the osgUtil library but I can't see how I would be able to resolve that.
Any and all advice would be appreciated - though I definitely require sleep soon so I may not respond immediately.
Dlls are not included at compile time. Specifying the folder only is not sufficient. you need to specify that you are going to use OsgUtild.lib explicitly to linker.

Compiling 32 bit code to 64 bit

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;

How to get VS2008 to use __cdecl rather than __thiscall in C++ project?

I am trying to build an open source C++ project in Visual Studio 2008. I load the solution file and everything compiles, but I'm getting a bunch of linking errors due to certain methods not being found. After using DUMPBIN.EXE to examine the .lib file in question, I can see what the problem is: the methods in the .lib all have __cdecl in their signatures, while the linker is looking for the equivalent methods with __thiscall instead.
How can I get VS 2008 to use __cdecl instead?
NOTE: The project is a fork of CCV, a multi-touch tracking program based on OpenCV. The purpose of this fork is to provide support for a camera called the Flea3 via the FlyCapture2 libraries provided by the camera's maker. Here are the linker errors:
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::Image::Image(void)" (__imp_??0Image#FlyCapture2##QAE#XZ) referenced in function "public: __thiscall ofxFlea3::ofxFlea3(void)" (??0ofxFlea3##QAE#XZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall FlyCapture2::Image::~Image(void)" (__imp_??1Image#FlyCapture2##UAE#XZ) referenced in function "public: __thiscall ofxFlea3::ofxFlea3(void)" (??0ofxFlea3##QAE#XZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::Camera::Camera(void)" (__imp_??0Camera#FlyCapture2##QAE#XZ) referenced in function "public: __thiscall ofxFlea3::ofxFlea3(void)" (??0ofxFlea3##QAE#XZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall FlyCapture2::Camera::~Camera(void)" (__imp_??1Camera#FlyCapture2##UAE#XZ) referenced in function "public: __thiscall ofxFlea3::ofxFlea3(void)" (??0ofxFlea3##QAE#XZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall FlyCapture2::Error::~Error(void)" (__imp_??1Error#FlyCapture2##UAE#XZ) referenced in function "void __cdecl PrintError(class FlyCapture2::Error)" (?PrintError##YAXVError#FlyCapture2###Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall FlyCapture2::Error::PrintErrorTrace(void)const " (__imp_?PrintErrorTrace#Error#FlyCapture2##UBEXXZ) referenced in function "void __cdecl PrintError(class FlyCapture2::Error)" (?PrintError##YAXVError#FlyCapture2###Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::BusManager::GetCameraFromIndex(unsigned int,class FlyCapture2::PGRGuid *)" (__imp_?GetCameraFromIndex#BusManager#FlyCapture2##UAE?AVError#2#IPAVPGRGuid#2##Z) referenced in function "public: void __thiscall ofxFlea3::listDevices(void)" (?listDevices#ofxFlea3##QAEXXZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall FlyCapture2::BusManager::~BusManager(void)" (__imp_??1BusManager#FlyCapture2##UAE#XZ) referenced in function "public: void __thiscall ofxFlea3::listDevices(void)" (?listDevices#ofxFlea3##QAEXXZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::Error::Error(class FlyCapture2::Error const &)" (__imp_??0Error#FlyCapture2##QAE#ABV01##Z) referenced in function "public: void __thiscall ofxFlea3::listDevices(void)" (?listDevices#ofxFlea3##QAEXXZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::BusManager::GetNumOfCameras(unsigned int *)" (__imp_?GetNumOfCameras#BusManager#FlyCapture2##UAE?AVError#2#PAI#Z) referenced in function "public: void __thiscall ofxFlea3::listDevices(void)" (?listDevices#ofxFlea3##QAEXXZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::Error::Error(void)" (__imp_??0Error#FlyCapture2##QAE#XZ) referenced in function "public: void __thiscall ofxFlea3::listDevices(void)" (?listDevices#ofxFlea3##QAEXXZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::BusManager::BusManager(void)" (__imp_??0BusManager#FlyCapture2##QAE#XZ) referenced in function "public: void __thiscall ofxFlea3::listDevices(void)" (?listDevices#ofxFlea3##QAEXXZ)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Image::Save(char const *,enum FlyCapture2::ImageFileFormat)" (__imp_?Save#Image#FlyCapture2##UAE?AVError#2#PBDW4ImageFileFormat#2##Z) referenced in function "public: void __thiscall ofxFlea3::initFlea3(int,int,int,int)" (?initFlea3#ofxFlea3##QAEXHHHH#Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Image::Convert(enum FlyCapture2::PixelFormat,class FlyCapture2::Image *)const " (__imp_?Convert#Image#FlyCapture2##UBE?AVError#2#W4PixelFormat#2#PAV12##Z) referenced in function "public: void __thiscall ofxFlea3::initFlea3(int,int,int,int)" (?initFlea3#ofxFlea3##QAEXHHHH#Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Image::ReleaseBuffer(void)" (__imp_?ReleaseBuffer#Image#FlyCapture2##UAE?AVError#2#XZ) referenced in function "protected: virtual void __thiscall ofxFlea3::getNewFrame(unsigned char *)" (?getNewFrame#ofxFlea3##MAEXPAE#Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual struct FlyCapture2::TimeStamp __thiscall FlyCapture2::Image::GetTimeStamp(void)const " (__imp_?GetTimeStamp#Image#FlyCapture2##UBE?AUTimeStamp#2#XZ) referenced in function "protected: virtual void __thiscall ofxFlea3::getNewFrame(unsigned char *)" (?getNewFrame#ofxFlea3##MAEXPAE#Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual unsigned char * __thiscall FlyCapture2::Image::GetData(void)" (__imp_?GetData#Image#FlyCapture2##UAEPAEXZ) referenced in function "protected: virtual void __thiscall ofxFlea3::getNewFrame(unsigned char *)" (?getNewFrame#ofxFlea3##MAEXPAE#Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual unsigned int __thiscall FlyCapture2::Image::GetDataSize(void)const " (__imp_?GetDataSize#Image#FlyCapture2##UBEIXZ) referenced in function "protected: virtual void __thiscall ofxFlea3::getNewFrame(unsigned char *)" (?getNewFrame#ofxFlea3##MAEXPAE#Z)
1>ofxFlea3.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall FlyCapture2::Image::GetDimensions(unsigned int *,unsigned int *,unsigned int *,enum FlyCapture2::PixelFormat *,enum FlyCapture2::BayerTileFormat *)const " (__imp_?GetDimensions#Image#FlyCapture2##UBEXPAI00PAW4PixelFormat#2#PAW4BayerTileFormat#2##Z) referenced in function "protected: virtual void __thiscall ofxFlea3::getNewFrame(unsigned char *)" (?getNewFrame#ofxFlea3##MAEXPAE#Z)
By default Visual Studio will use __thiscall for member functions. Since it compiles correctly, it seems like the headers in your library do not explicitly declare the calling convention.
It sounds like you need to use C linkage against the library. Try wrapping the library headers with
extern "C" { }
The problem was that I was linking against the 64-bit version of the external FlyCapture2 library. Switching to the 32-bit version solved the problem.