Sample Header Ad - 728x90

can’t link C++ code to .dylib in Xcode 12.2 (release build only)

0 votes
1 answer
825 views
I recently upgraded from Xcode 12.1 to 12.2, on macOS Catalina 10.15.7. My C++ project (which uses OpenCV) compiled without problem with Xcode 12.1. After the upgrade I get a lot of these: ld: warning: ignoring file /usr/local/Cellar/opencv/4.5.0_5/lib/libopencv_gapi.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 (I would have been unable to work but luckily I noticed that changing the “My Mac” *Scheme* to use *Debug* instead of *Release* for *Build Configuration* allows it to build without issue. Just runs much slower.) My web searching suggests this might be related to “universal binary” compilation? Apparently the Apple approved solution is to wait for OpenCV to release a “universal binary” version of the .dylib? Until then: - is there a way to say that, for now, I only care about the x86_64 machine I am developing on? - is it possible to roll back to Xcode 12.1?
Asked by Craig Reynolds (123 rep)
Dec 6, 2020, 07:19 PM
Last activity: Dec 6, 2020, 08:07 PM