小编nes*_*rus的帖子

assimp undefined对Importer Ubuntu OpenGL的引用

undefined reference to `Assimp::Importer::Importer()'
undefined reference to `Assimp::Importer::~Importer()'
Run Code Online (Sandbox Code Playgroud)

在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
Run Code Online (Sandbox Code Playgroud)

这是失败的具体代码

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

//.....
Assimp::Importer importer;
//....
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

我没有对使用Assimp的makefile做任何特殊操作.没看到我应该去的地方.

我也试过libassimp-dev包上的sudo apt-get install,我尝试过sudo ldconfig.我还在makefile中尝试了一个include.出于想法.

opengl assimp

3
推荐指数
1
解决办法
1986
查看次数

为什么c ++告诉我没有[]匹配我传入的类型?

static const map<const Type*, int>* priority;
Run Code Online (Sandbox Code Playgroud)

其中Type是我自己的特殊类.

初始化(为什么c ++要求这个我不知道,auto甚至不工作)

const map<const Type*, int, less<const Type*>, allocator<pair<const Type* const, int>>>* ToolProperty::priority
= new map<const Type*, int, less<const Type*>, allocator<pair<const Type* const, int>>>();
Run Code Online (Sandbox Code Playgroud)

最后,尝试使用它(它告诉我,我传递的是错误的类型)

static void setPriority(const Type* type, int newPriority)
{
    (*priority)[type] = newPriority;
}
Run Code Online (Sandbox Code Playgroud)

c++ map

2
推荐指数
1
解决办法
93
查看次数

标签 统计

assimp ×1

c++ ×1

map ×1

opengl ×1