i get the following error when i run j2objcc -o blssmibi BLSSMIBI.o
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Curve", referenced from:
objc-class-ref in BLSSMIBI.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
what should i do to fix this?
There's no Curve class anywhere in j2objc's libraries, so my guess it's a dependency from the Java file that you used to generate BLSSMIBI (maybe that's the it looks like a package prefix was used). If you aren't sure what a class's dependencies are, try compiling with javac to a temporary directory and see what name.class files are created (ignore the ones with $ in their names, as they're inner classes). That list of class files is used to figure out all the classes that need transpiling, as well as all the .o files that the app requires.
Related
I am getting this error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ShellTask", referenced from:
objc-class-ref in PhoneLocator.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Architectures of my target is $(ARCHS_STANDARD)
I have checked online throughout day :(. But I didn't get any solution. How can I resolve this issue.
_OBJC_CLASS_$_ShellTask this error means ShellTask this the file name. When you getting these sort of error it means that the file is missing under your compile sources. Just add that file the error will be gone
In target -> Build Phases -> Compile Sources I had all .m files including those that were giving issue.
I get error:
ld: 24 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
because I have two libraries that both use GTMLogger.o.
/Users/***/Library/Developer/Xcode/DerivedData/project-name/Build/Products/Debug-iphoneos/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
/Users/***/project-name/Libraries/Framework/Framework.framework/Framework(GTMLogger.o)
One library is included as cocoapod and the other is included manually. Second library cant be included as cocoapod.
I need both libraries and just want to know is there a way to solve this?
I am currently trying to make a simple "Server Status" app for a game I play, All it needs to do is parse XML from a URL and output the result. I am currently stuck on these errors which I think have something to do with the way I linked/incorporated my GDataXML
See Images for Error(s), Sorry I could post picture directly. Not enough reputation:
Error (1)
Undefined symbols for architecture i386: "_OBJC_CLASS_$_GDataXMLDocument", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error (2)
Undefined symbols for architecture i386: "_OBJC_CLASS_$_GDataXMLDocument", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Linker can't find object for GDataXML.
Looks like you need build GDataXML and add path where library built to the linker.
It might be as you suspect, the class you are trying to use isn't incorporated in your project correctly, or linked to the target correctly. Maybe this SO post will help you more.
So I'm building an application with CorePlot, and when I tried to run it i got the following errors:
ld: warning: ignoring file /Users/tcbl/Library/Developer/Xcode/DerivedData/FaceTracker- chbhtqlxwipamtailjamrakmkpuy/Build/Products/Debug-iphoneos/libCorePlot-CocoaTouch.a,
file was built for archive which is not the architecture being linked (armv6)
ld: duplicate symbol _main in /Users/tcbl/Library/Developer/Xcode/DerivedData/FaceTracker-chbhtqlxwipamtailjamrakmkpuy/Build/Intermediates/FaceTracker.build/Debug-iphoneos/FaceTracker.build/Objects-normal/armv6/main-cocoatouch.o and /Users/tcbl/Library/Developer/Xcode/DerivedData/FaceTracker-chbhtqlxwipamtailjamrakmkpuy/Build/Intermediates/FaceTracker.build/Debug-iphoneos/FaceTracker.build/Objects-normal/armv6/main.o for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I read somewhere that I need to add to other linker flags: -ObjC -all_load -lCorePlot But this doesn't seem to be anywhere in the project info or build settings, and I'm not sure if this even has anything to do with my error. Any help demystifying this would be much appreciated.
If you select your project and go to the Build Settings tab, you should find it listed under Linking. Make sure you have the advanced/complete view of the tab. The field you want to enter those under is "Other Linker Flags".
Hope that helps!
I am learning objective-c and XCode using Stephen Kochan's book. For one of the assignments, I needed to implement an AddressBook lookup feature from the command line. I used two classes from a previous project, added the files and did not make a copy. All builds fine in XCode, but when I issue the following command at the command line:
clang -fobjc-arc -framework Foundation main.m -o ch19
I get the error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AddresBook", referenced from:
objc-class-ref in cc-bx2cgt.o
"_OBJC_CLASS_$_AddressCard", referenced from:
objc-class-ref in cc-bx2cgt.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
No typo in AddresBook, my class name has one "s". I tried removing the files (AddresBook.h and .m and AddressCard.h and .m) from my project, adding them with and without copying. Building and running the app in XCode works just fine.
How can I "clear" out the references and add them again so that I can compile it from the command line?
Thank you.
You need to add those other files object codes.
clang -fobjc-arc -framework Foundation main.m AddressBook.m -o ch19 or compile them to object files and then link them.
You should also be using xcodebuild for this, if you want to do it on the command line.