This happened to me also, in Xcode 11.4 ( main version, not the beta ) with my library.There was no failure In Xcode 11.3.the architecture of my library is x86_64 and arm64I have no solution right now
Post
Replies
Boosts
Views
Activity
Have done your advice, but when I exclude the library and start the program, I get a lot of linking failure messages from that library. It seems that the ios Simulator needs the static library. Everything was fine in Xcode 11.3 and no more in Xcode 11.4
Thanks for the info.But I did not get the library running by changes in Xcode settings. So, I tried to recompile it in xcode 11.4The library is a static C-Library. . So, c-code has to be compiled and linked. I have done it before and library was running in Xcode 11.3in the MAKE file I adjusted:CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ccCFLAGS = -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdkWhen I run it, I receive a new library. This library is arch: X86_64 and arm64But even with this new created library in my project I get the same mistake:"Building for ios simulator , but the linked library was build for macOS + iosThen I changed the CFLAGS to the iphone simulator platform:CFLAGS = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdkProblem is that I do not know what is the arch for the Simulator ?Can You help me to adjust the CFLAGS settings or other adjustments in the MAKE File to receive a library accepted by the simulator ?Thanks, Robert
In Your answer before, You adviced me to create the library through an xcode project or a Swift package.. I give you first here the info, how I have done it actuallyTo create the library , I did the following steps:I have some -.c files that have to be compiled and linked to get the library.for all that I use the Terminal :1. I gave the -.c files in a folder /usr/local/f2c/libf2c2. I modified the makefile on CC and CFLAGS to adjust for the Xcode settingshere some extracts of the makefile:.SUFFIXES: .c .oCC = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc"SHELL = /bin/shCFLAGS = -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk# compile, then strip unnecessary symbols.c.o: $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c. # HERE the COMPILING starts ld -r -x -o $*.*** $*.o mv $*.*** $*.o.....all: f2c.h signal1.h sysdep1.h libf2c.a........libf2c.a: $(OFILES) ar r libf2c.a $? -ranlib libf2c.a3. I call ' make ' in the terminal and then the sript is runningResult is a library called : libf2c.ato check the library by : lipo -info libf2c.athis library is architecture X86_64 and arm64, same as before, when I created it with previous MAC and Xcode versionsBut even the library is now created by MAC OS 10.15.4 and Xcode 11.4, the error message is the same:"Building for ios Simultor but the linked library 'libf2c.a' was build for mac OS + iosIf you want, then I can ship You all the c-files and the makefile, to that you can reproduce the creation of the library.What shold be the solution to create a library running in Xcode 11.4 , both in Simulator and on device, same as before ?You adviced to do it in a xcode project, but How can I do all the works inside a xcode project or from a swift package, when I have native C-code ? In my Xcode project, i just inserted the library and it was working. But no more in Xcode 11.4
Have done your advice with the template for static library. It works !I created 2 librarys, because I had the cources. One was for simulator and the other for device.Then I put both together by lipo command and I use it for my App.Now it is running on simulator and device as before.Previous library had a size of 250 KB, but the new generated library 1.4 MB.Both librarys are architecture: x86_64, arm64