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

在 Ubuntu 上,使用 OpenGL。

遵循这些步骤

    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

这是失败的具体代码

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

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

有任何想法吗?

我没有对 makefile 做任何特别的事情来使用 Assimp。没有看到我应该看到的任何地方。

我还在 libassimp-dev 包上尝试了 sudo apt-get install 并且我尝试了 sudo ldconfig。我还尝试了在 makefile 中包含。没有想法。

4

1 回答 1

7

解决了

在视频中找到解决方案

makefile 中需要 -lassimp

于 2014-09-17T09:07:04.253 回答