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

errors when compiling for iOS #944

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

errors when compiling for iOS #944

wtholliday opened this issue Sep 20, 2024 · 5 comments

Comments

@wtholliday
Copy link
Contributor

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
Contributor 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...

@pca006132 pca006132 mentioned this issue Oct 1, 2024
11 tasks
pca006132 added a commit to pca006132/manifold that referenced this issue Oct 2, 2024
pca006132 added a commit that referenced this issue Oct 2, 2024
* cleanup files

* hide some public APIs

* merged CMakeLists.txt for headers

* fix build

* include cleanup

* include cleanup again

* address #944

* python cmake install

* iostream is still needed

* fix nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants