Take the 2-minute tour ×

In which directory should I store the .obj models in Visual Studio 2010?

I am using the OpenGL Mathematics (GLM) library to use them in OpenGL, and when I try to load the object it shows

Error11error LNK2019: unresolved external symbol _glmReadOBJ referenced in function _SDL_main

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Your question seems to have no relation to your actual problem. You're not getting this error when you "try to load the object"; this is a linker error. You get this when you try to compile and link your code. It has nothing to do with where the ".obj" files are stored, because you haven't created a functioning executable yet.

The linker error is telling you that you probably did not link to the GL Mesh library correctly.

share|improve this answer
ohh.... i downloaded the glm library from the site devernay.free.fr/hacks/glm but the folder just contains .h and .cpp files... i included the .h files in my project ... but how do i create the links when there are no .lib files ? –  Aditya Pawade Sep 26 '11 at 11:38
@adityap174: You build the library; that's what a source code distribution is for. I checked the download and sadly it doesn't come with a VS-compatible build system. So you'll have to try to figure out how the makefile-based build works and replicate it in VS2010.. –  Nicol Bolas Sep 26 '11 at 11:48
Thank you so much for your help... m new to this.... i compiled it using dev cpp now it's working properly thanx :) :) –  Aditya Pawade Sep 26 '11 at 12:30
add comment

I know this is resolved already but, for future reference if you look at the readme.txt that comes with GLM the "GLM Usage" section has the following:

    GLM is a header only library, there is nothing to build, just include it.
    #include <glm/glm.hpp>

So if you are using VStudio you'll just need to add the directory containing the GLM headers as a "Additional Include Directory" (Right Click the Project, Select Properties, Select "General" under "C/C++", should be top entry.) Good deal.

share|improve this answer
Actually i was not able to use it directly by including it. It used to give some linkage errors. Don't remember now. It was 2 years ago. I compiled it using Dev Cpp and it started working properly. Anyways thanks for the tip –  Aditya Pawade Jul 5 '13 at 15:39
add comment

Your Answer


