Ocean is the in-house framework for Computer Vision (CV) and Augmented Reality (AR) applications at Meta. It is platform independent and is mainly implemented in C/C++.
The list of source files of these apps included files that are only meant for the desktop versions of these test apps. They need to be excluded from iOS builds in order to avoid linker errors about duplicate symbols similar to this:
ld: warning: ignoring duplicate libraries: '/Users/nils/build_ocean_ios_release/impl/ocean/base/Debug-iphoneos/libocean_base.a', '/Users/nils/build_ocean_ios_release/impl/ocean/test/testcv/Debug-iphoneos/libocean_test_testcv.a'
duplicate symbol '_main' in:
/Users/nils/build_ocean_ios_release/build/application_ocean_test_cv_testcv_testsegmentation_ios.build/Debug-iphoneos/Objects-normal/arm64/Main.o
/Users/nils/build_ocean_ios_release/build/application_ocean_test_cv_testcv_testsegmentation_ios.build/Debug-iphoneos/Objects-normal/arm64/TestCVSegmentation.o
ld: 1 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The list of source files of these apps included files that are only meant for the desktop versions of these test apps. They need to be excluded from iOS builds in order to avoid linker errors about duplicate symbols similar to this:
Test plan:
On a Mac, follow the instructions for iOS builds:
https://github.com/facebookresearch/ocean/blob/main/building_for_ios.md
Then, build, install, and start each of the following targets from XCode:
application_ocean_test_base_testbase_ios
application_ocean_test_cv_testcv_ios
application_ocean_test_cv_testcv_testadvanced_ios
application_ocean_test_cv_testcv_testdetector_ios
application_ocean_test_cv_testcv_testdetector_testqrcodes_ios
application_ocean_test_cv_testcv_testsegmentation_ios
application_ocean_test_geometry_testgeometry_ios
application_ocean_test_math_testmath_ios
application_ocean_test_media_testmedia_ios
application_ocean_test_platform_testplatform_ios
application_ocean_test_tracking_testtracking_ios