简体   繁体   English

将Codeblock glut项目与assimp库链接

[英]Linking Codeblock glut project with assimp library

Hello I am new with assimp and have a problem. 您好,我是assimp的新手,有问题。 When I try to include the: 当我尝试包括:

#include <assimp/cimport.h>

#include <assimp/scene.h>

#include <assimp/postprocess.h>

in a c++ glut project it says No such file or directory, so I obviously need to link some libraries to the project. 在c ++ glut项目中,它说没有这样的文件或目录,因此我显然需要将一些库链接到该项目。 The question is where can I find that library. 问题是我在哪里可以找到该库。 I downloaded assimp view 3.0 and opened the object i need to inport in c++ with it and so far it look ok. 我下载了assimp view 3.0,并打开了我需要在c ++中导入的对象,到目前为止看起来还不错。

http://assimp.sourceforge.net/lib_html/usage.html .. Is the link to how to use assimp with c++ but no info how to link it http://assimp.sourceforge.net/lib_html/usage.html ..是如何在c ++中使用assimp的链接,但没有如何链接的信息

You should have read up on the very site you linked. 您应该已经在链接的网站上进行了阅读。

http://assimp.sourceforge.net/lib_html/install.html http://assimp.sourceforge.net/lib_html/install.html

These are installation directions. 这些是安装说明。 The very top looks like it talks about using prebuilt libraries and telling you what to link into your visual studio project. 最顶层看起来像在谈论如何使用预构建的库,并告诉您要链接到Visual Studio项目的内容。

One last note: you are using the c interface according to your question. 最后一点:根据问题使用c接口。 After reading the documentation I see that they have a C++ specific importer header you may want to use instead. 阅读文档后,我发现它们具有特定于C ++的导入程序标头,您可能想使用它。

#include <assimp/Importer.hpp>

EDIT: This answer assumes you are using visual studio of course. 编辑:此答案假定您当然正在使用Visual Studio。 However, that link also provides building from scratch instructions as well as other ways of building and installing the library. 但是,该链接还提供了从头开始构建的说明以及构建和安装库的其他方式。 So if you are a linux/unix user I imagine you can make do with these instructions. 因此,如果您是linux / unix用户,我想您可以使用这些说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM