【问题标题】:Assimp's aiImportFile() identifier not found未找到 Assimp 的 aiImportFile() 标识符
【发布时间】:2014-05-18 08:28:45
【问题描述】:

这里有我的标题:

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

它编译并且没有未解析的外部,所以我的库文件应该是正确的。

但再往下:

/* load file with assimp and print some stats */

const aiScene* scene = aiImportFile(file_name, aiProcess_Triangulate);
if (!scene) {
    fprintf(stderr, "ERROR: reading mesh %s\n", file_name);
    return false;
}

我收到一个关于 aiImportFile 的错误,即找不到它的标识符。这与 assimp 的所有其他工作一样令人费解。

我该如何解决这个问题?目前编译 assimp 的源代码不起作用,我没有得到任何库文件,所以我坚持使用“完整”下可用的内容。

【问题讨论】:

  • 我遇到了同样的错误。如果我能找到解决方案,我会在这里发布。
  • 是的,抱歉,我很确定我前段时间解决了这个问题,但忘记了我已经解决了这个问题,解决方案很可能在发布模式下运行,你是在调试中运行代码吗?跨度>

标签: c++ windows visual-studio opengl assimp


【解决方案1】:

经过大量工作以找到解决方案,我很确定问题是在调试模式下编译库。我相信它只适用于发布模式。

不幸的是,这是不久前的事了,我的电脑上目前没有代码,所以我不是 100% 确定,但我有 90% 确定。

【讨论】:

  • 确认我在调试模式下构建时也遇到了这个问题。发布模式运行良好。
猜你喜欢
  • 2014-04-07
  • 1970-01-01
  • 2016-07-25
  • 2014-07-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多