building and using a library(assimp) in linux

Viewed 302

I'm trying to use assimp(on linux) for loading 3D models into my project and building the library itself is very easy since it has a cMakeLists.txt file that automates the build process. But, once the library is built it provides the a folder assimp with the structure:

enter image description here

I think the three major folders to note here are the bin, the lib and the include

My project structure is basically like this:

enter image description here

The command I would use for compiling before assimp was in my project requirement was this:

> g++ -std=c++17 -I/home/user/lighting/mLib main7.cpp -o main.out -lGL -lglfw -lGLU

But, now I am confused with these things:

  1. Am I supposed to link to the binary in the bin or the lib files in the assimp/lib folder.
  2. I have included the header files in my source code and specified the include path, but how am I supposed to link to the libraries of the assimp?
  3. There are 4 lib files inside the assimp/lib folder, which ones am I supposed to link to?
  4. Even though I'm using make to automate the build, but what would be the terminal command to build the project linking the assimp library?

I try to use the following but it throws an -lassimp not found error:

> g++ -std=c++17 -I/home/user/lighting/mLib -L/home/user/lighting/assimp/lib main7.cpp -o main.out -lGL -lglfw -lGLU -lassimp
0 Answers
Related