Linking a library issue

Hi,

I have a library that I’m trying to link to an OF project but am getting this error:

The linked library ‘***.a’ is missing one or more architectures required by this target: x86_64.

I’ve been trying all kinds of combinations in the Architecture settings without much luck.

I’m on macOS 11.6.1, xcode 13.2.1, building using c++ 17, OF 11.2

All help appreciated.

any more info on the .a library?
you can inspect your library architectures using the file command
file, like

file /Volumes/tool/ofw/addons/ofxOpenCv/libs/opencv/lib/osx/libopencv_ml.a
/Volumes/tool/ofw/addons/ofxOpenCv/libs/opencv/lib/osx/libopencv_ml.a: Mach-O universal binary with 2 architectures: [x86_64:current ar archivecurrent ar archive] [arm64]
/Volumes/tool/ofw/addons/ofxOpenCv/libs/opencv/lib/osx/libopencv_ml.a (for architecture x86_64): current ar archive
/Volumes/tool/ofw/addons/ofxOpenCv/libs/opencv/lib/osx/libopencv_ml.a (for architecture arm64): current ar archive

I think OF 11.2 release is not c++17 ready also

Hey yes dimitre is right on in that the 0.11.2 release is not compatible with c++17, but the nightly build is and will use c++17 by default. So use the nightly build if you need to use c++17 for the library.