与mingw-w64WinBuilds的Assimp链接错误

问题描述

我正在尝试使用mingw-w64(x86_64-w64-mingw32-g ++)编译使用assimp的项目,并且链接器会产生以下错误:

MyCustomExtension.getPriority

看起来链接程序无法将assimp的动态库与项目链接。我使用.dll和.lib文件,它们是从最新的assimp源(使用CMake和Visual Studio)编译而来的,而链接程序找不到的功能则显示在dll和lib中(已通过dumpbin检查)。所有文件都是x64位。

这是我的编译方式:

render/model.o: In function `Model::loadModel(std::string)': render/model.cpp:9: undefined reference to `Assimp::Importer::Importer()' render/model.cpp:15: undefined reference to `Assimp::Importer::GetErrorString() const' render/model.cpp:20: undefined reference to `Assimp::Importer::~Importer()' render/model.cpp:20: undefined reference to `Assimp::Importer::~Importer()' render/model.o: In function `Assimp::Importer::ReadFile(std::string const&,unsigned int)': include/assimp/Importer.hpp:653: undefined reference to `Assimp::Importer::ReadFile(char const*,unsigned int)'

已经尝试使用旧的预编译二进制文件,它产生相同的结果。试图使用mingw-w64编译assimp,但失败了。

任何想法会导致链接器看不到功能吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)