Search code examples
openglassimp

assimp undefined reference to Importer Ubuntu OpenGL


undefined reference to `Assimp::Importer::Importer()'
undefined reference to `Assimp::Importer::~Importer()'

On Ubuntu, using OpenGL.

Followed these steps

    Download assimp

        http://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1.zip/download

    Open the archive and extract the assimp folder somewhere

    Open a terminal in the assimp directory

    Type

        ~$ cmake -G 'Unix Makefiles'
        ~$ make
        ~$ make install

Here is the specific code that is failing

#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>

//.....
Assimp::Importer importer;
//....

Any ideas?

I did not do anything special with the makefile to use Assimp. Didn't see anywhere that I was supposed to.

I have also tried sudo apt-get install on the libassimp-dev package and I have tried a sudo ldconfig. I also tried an include in the makefile. Out of ideas.


Solution

  • Solved

    Found solution in a video

    needed -lassimp in makefile