gpt4 book ai didi

opengl - assimp undefined reference to Importer Ubuntu OpenGL

转载 作者:行者123 更新时间:2023-12-04 16:24:08 27 4
gpt4 key购买 nike

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。没有看到我应该看到的任何地方。

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

最佳答案

已解决

在视频中找到解决方案

makefile 中需要 -lassimp

关于opengl - assimp undefined reference to Importer Ubuntu OpenGL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25886122/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com