I'm writing a small OpenGL project for an exam, and I need to link Assimp to the project through CMake. (https://github.com/LordRibblesdale/CotecchioGame). I'm using MinGW64 and I didn't manage to build Assimp libraries via mingw32-make
undefined reference to Assimp::Importer::Importer()'
undefined reference to Assimp::Importer::~Importer()'
undefined reference to Assimp::Importer::ReadFile(char const*, unsigned int)'
So I downloaded mingw-w64-x86_64-assimp (5.0.1-2) from msys2 package collection and included them into the project, linked them through CMake here
target_link_libraries(${PROJECT_NAME} "${CMAKE_SOURCE_DIR}/Graphics/assimp/libassimp.dll.a")
But, after everything is compiled, put libassimp.dll from MSYS2 package into executable root
Executable.exe & libassimp.dll
I have this result
The procedure entry point _ZNSt7__cxx1118basic_stringstreamlcSt11char_traitslcESalcEEC1Ev could not be located in the dynamic link library C:\User\Green\CLionProjects\CotecchioGame\libassimp.dll
Am I missing something about library linking, or library calling where I'm using it? (return 0; is only for checking that everything is good
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
int main(int argc, char** argv) {
std::string s("C:\\Users\\Green\\CLionProjects\\CotecchioGame\\Test.fbx");
Assimp::Importer importer;
std::unique_ptr<const aiScene> scene(importer.ReadFile(s, aiProcess_Triangulate));
if (!scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode) {
return 0;
}
}
Or isn't this the correct library instead (or other libraries are needed to be linked (even if the error is related to libassimp.dll))?