Load obj using tinyobj::LoadObj from tiny_obj_loader

Post Reply
yluo
Posts: 3
Joined: Tue Sep 25, 2018 9:31 pm

Load obj using tinyobj::LoadObj from tiny_obj_loader

Post by yluo » Fri Oct 05, 2018 10:22 pm

Hi,

I am trying to implement the .obj file loading by using the tinyobj::LoadObj. The specific command I use is:

Code: Select all

std::string err = tinyobj::LoadObj(shapes, relativeFileName, materialPrefixPath);
What I got from the compiler:

Code: Select all

1>LoadObj.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl tinyobj::LoadObj(class std::vector<struct tinyobj::shape_t,class std::allocator<struct tinyobj::shape_t> > &,char const *,char const *)" (?LoadObj@tinyobj@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$vector@Ushape_t@tinyobj@@V?$allocator@Ushape_t@tinyobj@@@std@@@3@PBD1@Z) referenced in function "class btCollisionShape * __cdecl LoadShapeFromObj(char const *,char const *,class btVector3 const &)" (?LoadShapeFromObj@@YAPAVbtCollisionShape@@PBD0ABVbtVector3@@@Z)
1>E:\Box Sync\_VR\MyProj\Debug\MyProj.exe : fatal error LNK1120: 1 unresolved externals
So, I understand one usually get "unresolved externals" kind of linker error because of not including the associated .lib binary file. However I was not able to find the .lib file anywhere near the "..examples\ThirdPartyLibs\Wavefront\tiny_obj_loader.h". Do I need to build to acquire the library file?

I have included the ThirdPartyLibs to my project path. This is what I put in my linkers additional dependencies:

BulletDynamics.lib
BulletCollision.lib
LinearMath.lib
OpenGL_Window.lib
Bullet3Common.lib

Thanks

Post Reply