简体   繁体   English

使用 mingw32 构建 Assimp

[英]Build Assimp with mingw32

Hello i tried to compile Assimp with mingw32.您好,我尝试使用 mingw32 编译 Assimp。

But during compilation multiple errors appeard.但是在编译过程中出现了多个错误。

The first was:第一个是:

C:\Users\MY_NAME\Downloads\assimp-5.0.1\assimp-5.0.1\code\SMD\SMDLoader.cpp:579:12: error: 'strtok_s' was not declared in this scope; did you mean 'strtok_r'?

I found a solution for the this problem,i changed the source code and it worked but i don't found a solution for the second problem.我找到了这个问题的解决方案,我更改了源代码并且它工作但我没有找到第二个问题的解决方案。 The second error was:第二个错误是:

c:\users\MY_NAME\downloads\assimp-5.0.1\assimp-5.0.1\contrib\zip\src\zip.h:30:15: error: conflicting declaration 'typedef long int ssize_t' 
30 | typedef long  ssize_t;  /* byte count or error */

here is line 30 from zip.h:这是 zip.h 的第 30 行:

typedef long  ssize_t;  /* byte count or error */

To make it more clear,i decided to show you a block of code.为了更清楚,我决定向您展示一段代码。 here is a block of code from line 27 to 31 in zip.h这是 zip.h 中第 27 行到第 31 行的代码块

#ifdef _WIN64
typedef long long  ssize_t;  /* byte count or error */
#else
typedef long  ssize_t;  /* byte count or error *
#endif

I'm using mingw32 with gcc (9.2.0)我正在使用 mingw32 和 gcc (9.2.0)

Can someone explain why the build fail?有人可以解释为什么构建失败吗?

As far as I know, this issue is already closed in our current master.据我所知,这个问题已经在我们当前的主人中关闭。 Could you please try the latest from Asset-Importer-Lib@github ?你能试试Asset-Importer-Lib@github的最新版本吗?

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

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