Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Build error ISO C99 and later do not support implicit function declarations #5572

Closed
armanTabib opened this issue May 13, 2024 · 1 comment
Labels
Bug Global flag to mark a deviation from expected behaviour

Comments

@armanTabib
Copy link

armanTabib commented May 13, 2024

Describe the bug
I have cloned the assimp project and I'm trying to build it for android. I go based on the assimp-doc project and when building I get following errors:

assimp/contrib/unzip/ioapi.c:114:16: error: call to undeclared function 'fopen64'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
...
/assimp/contrib/unzip/ioapi.c:114:14: error: incompatible integer to pointer conversion assigning to 'FILE *' (aka 'struct __sFILE *') from 'int' [-Wint-conversion]
...
/assimp/contrib/unzip/ioapi.c:144:21: error: call to undeclared function 'ftello64'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

...
/assimp/contrib/unzip/ioapi.c:190:8: error: call to undeclared function 'fseeko64'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

To Reproduce
Steps to reproduce the behavior:

  1. clone the assimp project
  2. run this command:
    cmake CMakeLists.txt -DASSIMP_ANDROID_JNIIOSYSTEM=ON -DCMAKE_TOOLCHAIN_FILE=path/to/sdk/ndk/27.0.11718014/build/cmake/android.toolchain.cmake -B ~/MyProjects/assimp-android/
  3. Go to ~/MyProjects/assimp-android/
  4. run cmake --build .
  5. See the error

Edit :
I even edited the CMakeList.txt file like:
set(CMAKE_C_STANDARD 90).
But the error still exists.
Expected behavior
The project should build without error.

Platform (please complete the following information):

  • OS: Ubuntu 23.04
  • ndk: 27.0.11718014
@armanTabib armanTabib added the Bug Global flag to mark a deviation from expected behaviour label May 13, 2024
@armanTabib
Copy link
Author

Adding flag -DANDROID_PLATFORM=24 seems to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour
Projects
None yet
Development

No branches or pull requests

1 participant