Jump to content
  • Advertisement
Sign in to follow this  
sled

Linking Problems

This topic is 4640 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to compile code in VS .Net that I originally was compiling for Linux. I'm using the VL vector library. I get the following errors during linking (I cut most of them off because they are so long):
Linking...
cg1.obj : error LNK2019: unresolved external symbol "public: void __thiscall vl::Mat4d::MakeDiag(double)" (?MakeDiag@Mat4d@vl@@QAEXN@Z) referenced in function "void __cdecl `anonymous namespace'::keyboardFunc(unsigned char,int,int)" (?keyboardFunc@?A0x579c0c7a@@YAXEHH@Z)
camera.obj : error LNK2001: unresolved external symbol "public: void __thiscall vl::Mat4d::MakeDiag(double)" (?MakeDiag@Mat4d@vl@@QAEXN@Z)
camera.obj : error LNK2019: unresolved external symbol "public: class vl::Mat4d & __thiscall vl::Mat4d::operator=(class vl::Mat4d const &)" (??4Mat4d@vl@@QAEAAV01@ABV01@@Z) referenced in function "public: void __thiscall Camera::SetRotation(class vl::Mat4d const &)" (?SetRotation@Camera@@QAEXABVMat4d@vl@@@Z)
camera.obj : error LNK2019: unresolved external symbol "public: class vl::Mat4d & __thiscall vl::Mat4d::operator*=(class vl::Mat4d const &)" (??XMat4d@vl@@QAEAAV01@ABV01@@Z) referenced in function "private: void __thiscall Camera::ArcBallRotation(int,int)" (?ArcBallRotation@Camera@@AAEXHH@Z)
camera.obj : error LNK2019: unresolved external symbol "public: class vl::Mat4d & __thiscall vl::Mat4d::MakeHRot(class vl::Vec3d const &,double)" (?MakeHRot@Mat4d@vl@@QAEAAV12@ABVVec3d@2@N@Z) referenced in function "private: void __thiscall Camera::ArcBallRotation(int,int)" (?ArcBallRotation@Camera@@AAEXHH@Z)
camera.obj : error LNK2019: unresolved external symbol "class vl::Mat4d __cdecl vl::trans(class vl::Mat4d const &)" (?trans@vl@@YA?AVMat4d@1@ABV21@@Z) referenced in function "public: void __thiscall Camera::ApplyModelview(void)const " (?ApplyModelview@Camera@@QBEXXZ)
surf.obj : error LNK2019: unresolved external symbol "class vl::Mat4d __cdecl vl::trans(class vl::Mat4d const &)" (?trans@vl@@YA?AVMat4d@1@ABV21@@Z) referenced in function "void __cdecl outputObjFile(class std::basic_ostream<char,struct std::char_traits<char> > &,struct Surface const &)" (?outputObjFile@@YAXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@ABUSurface@@@Z)
parse.obj : error LNK2019: unresolved external symbol "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl vl::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class vl::Vec3d &)" (??5vl@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV12@AAVVec3d@0@@Z) referenced in function "class std::vector<class vl::Vec3d,class std::allocator<class vl::Vec3d> > __cdecl `anonymous namespace'::readCps(class basic_istream<char,struct std::char_traits<char> >::basic_istream<char,struct std::char_traits<char> > &,unsigned int)" (?readCps@?A0x3a2e0ef7@@YA?AV?$vector@VVec3d@vl@@V?$allocator@VVec3d@vl@@@std@@@std@@AAV?$basic_istream@DU?$char_traits@D@std@@@3@I@Z)
parse.obj : error LNK2019: unresolved external symbol "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl vl::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class vl::Vec2d &)" (??5vl@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV12@AAVVec2d@0@@Z) referenced in function "class std::vector<class vl::Vec3d,class std::allocator<class vl::Vec3d> > __cdecl `anonymous namespace'::readCps(class basic_istream<char,struct std::char_traits<char> >::basic_istream<char,struct std::char_traits<char> > &,unsigned int)" (?readCps@?A0x3a2e0ef7@@YA?AV?$vector@VVec3d@vl@@V?$allocator@VVec3d@vl@@@std@@@std@@AAV?$basic_istream@DU?$char_traits@D@std@@@3@I@Z)
surf.obj : error LNK2019: unresolved external symbol "class vl::Mat4d __cdecl vl::inv(class vl::Mat4d const &)" (?inv@vl@@YA?AVMat4d@1@ABV21@@Z) referenced in function "struct Surface __cdecl makeGenCyl(class std::vector<struct CurvePoint,class std::allocator<struct CurvePoint> > const &,class std::vector<struct CurvePoint,class std::allocator<struct CurvePoint> > const &)" (?makeGenCyl@@YA?AUSurface@@ABV?$vector@UCurvePoint@@V?$allocator@UCurvePoint@@@std@@@std@@0@Z)
surf.obj : error LNK2019: unresolved external symbol "class vl::Vec4d __cdecl vl::operator*(class vl::Mat4d const &,class vl::Vec4d const &)" (??Dvl@@YA?AVVec4d@0@ABVMat4d@0@ABV10@@Z) referenced in function "struct Surface __cdecl makeGenCyl(class std::vector<struct CurvePoint,class std::allocator<struct CurvePoint> > const &,class std::vector<struct CurvePoint,class std::allocator<struct CurvePoint> > const &)" (?makeGenCyl@@YA?AUSurface@@ABV?$vector@UCurvePoint@@V?$allocator@UCurvePoint@@@std@@@std@@0@Z)
surf.obj : error LNK2019: unresolved external symbol "public: __thiscall vl::Mat4d::Mat4d(double,double,double,double,double,double,double,double,double,double,double,double,double,double,double,double)" (??0Mat4d@vl@@QAE@NNNNNNNNNNNNNNNN@Z) referenced in function "struct Surface __cdecl makeGenCyl(class std::vector<struct CurvePoint,class std::allocator<struct CurvePoint> > const &,class std::vector<struct CurvePoint,class std::allocator<struct CurvePoint> > const &)" (?makeGenCyl@@YA?AUSurface@@ABV?$vector@UCurvePoint@@V?$allocator@UCurvePoint@@@std@@@std@@0@Z)
Debug/cg1.exe : fatal error LNK1120: 10 unresolved externals


Any ideas what might be causing this? Is it caused by putting using namespace vl; in the wrong place? Or putting includes/not putting includes in the wrong/right places? Do I need to specify the .lib file somehow?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!