Hey guys,
I am trying to compile C++ code on Mac using command line tools(g++) to output a static library(.a). I compiled it with architecture support for arm64, however when I link it in Xcode project I get the following error
Building for iOS but linked library was built for MacOS
I have used following command
g++ -shared -o ./libCrossPiOS_TestMulti.iOS.a ./alpha.cpp -arch arm64
I understand that I can choose XCFrameworks route to get past this but wanted to understand what I'm missing in this approach.
Any help will be appreciated. Thanks in advance
Screenshot of error