从源中编译Assimp不会生成Libassimp文件
因此,我使用X64_X86开发人员命令提示提示了Assimp库,并用CMAKE编辑了CMAKE,该提示符被认为是必需的。 (当我尝试使用常规控制台CMAKE时,错误的错误是找不到“ CL编译器”)。
一段时间后,它最终对以下命令进行了编译:
cmake CMakeLists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
cmake --build .
它构建了3个文件:
C static library zlibstaticd.lib
CXX shared library ..\bin\assimp-vc142-mtd.dll
CXX executable ..\bin\unit.exe
但是没有libassimp.a或libassimp..,因此我可以在mingw中链接。我尝试在自己的项目中与te dll链接:
-L\"{assimp root directory}/bin\"
-lassimp-vc142-mtd
它失败了“对`sassimp :: Importer :: Importer()的不确定引用()”
我该如何使LIB文件链接到相反?
So I compiled the assimp library with cmake using the x64_x86 developer command prompt that was said to be required. (When I tried using the regular console cmake did an error that it could not find 'the cl compiler').
After some time it finally compiled without errors with the following commands:
cmake CMakeLists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
cmake --build .
It built 3 files:
C static library zlibstaticd.lib
CXX shared library ..\bin\assimp-vc142-mtd.dll
CXX executable ..\bin\unit.exe
But there was no libassimp.a or libassimp.so that I can link against in MinGW. I tried just linking with te dll in my own project with:
-L\"{assimp root directory}/bin\"
-lassimp-vc142-mtd
and it failed with "undefined reference to `Assimp::Importer::Importer()"
How can i get the lib file to link against?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我安装了MSYS2,用MSYS替换了现有的MINGW安装,图书馆完美地安装了,现在一切正常。
我的错误是:
I installed MSYS2, replaced my existing MinGW installation with MSYS, libraries installed flawlessly and everything works now.
My mistake was that: