Skip to content
New issue

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

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

Already on GitHub? # to your account

errors when compiling for iOS #944

Open
wtholliday opened this issue Sep 20, 2024 · 5 comments
Open

errors when compiling for iOS #944

wtholliday opened this issue Sep 20, 2024 · 5 comments

Comments

@wtholliday
Copy link

wtholliday commented Sep 20, 2024

I'm trying to compile manifold as an xcframework for iOS.

Doing this:

cmake -B build_ios -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64
cmake --build build_ios --config Release

(I'm using this toolchain file https://github.com/leetal/ios-cmake)

I get various errors like:

manifold/src/collider/include/manifold/collider.h:287:39: error: implicit conversion loses integer
      precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]

Probably can silence those warnings (though I'm lousy with CMake and -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF didn't do anything), but might be good to fix the underlying thing.

@elalish
Copy link
Owner

elalish commented Sep 21, 2024

Yeah, some of that is actually in process now. But we have a fair number of those warnings silenced already as they can get pretty pedantic.

@pca006132
Copy link
Collaborator

Probably need -DCMAKE_CXX_FLAGS="-Wno-shorten-64-to-32".

@pca006132
Copy link
Collaborator

I had a look at this, there are simply too many changes required, and we have to change the internal halfedges to 64-bit which can affect performance and require further evaluation. I think for now the only way is to silence the warning.

@wtholliday
Copy link
Author

@pca006132 what about adding casts in the code? Also that particular warning above can be fixed by changing the int to a size_t it seems.

@pca006132
Copy link
Collaborator

This requires a lot of changes. For each one it is simple, but there are many of them...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants