Application Tool Kit

Linking Errors when compiling with Swift


I am trying to integrate the MathWidget into a swift application. Currently, the I am receiving this error when trying to run the application:

Ld build/Debug-iphonesimulator/ normal x86_64
cd "/Users/kbai/Documents/XCode Projects/ios/FinalProject"
export PATH="/Applications/"
/Applications/ -arch x86_64 -isysroot /Applications/ -L/Users/kbai/Documents/XCode Projects/ios/FinalProject/build/Debug-iphonesimulator -F/Users/kbai/Documents/XCode Projects/ios/FinalProject/build/Debug-iphonesimulator -F/Users/kbai/MyScript_ATK-ios-2/Frameworks -filelist /Users/kbai/Documents/XCode Projects/ios/FinalProject/build/ -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.1 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/kbai/Documents/XCode Projects/ios/FinalProject/build/ -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/ -Xlinker -add_ast_path -Xlinker /Users/kbai/Documents/XCode Projects/ios/FinalProject/build/ -ObjC -lstdc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/kbai/Documents/XCode Projects/ios/FinalProject/build/ -framework ATKMathWidget -framework SystemConfiguration -framework ATKMath -framework ATKCore -Xlinker -dependency_info -Xlinker /Users/kbai/Documents/XCode Projects/ios/FinalProject/build/ -o /Users/kbai/Documents/XCode Projects/ios/FinalProject/build/Debug-iphonesimulator/

Undefined symbols for architecture x86_64:
"_myCertificate_BYTES", referenced from:
_myCertificate in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have put the certificate and #import <ATKMathWidget/MAWMathWidget.h> into the bridging header and am accessing them in my swift classes.

How can I resolve this problem?

Dear Kevin,

Similar trouble have been reported by other developers and it seems to be due to the Xcode build settings. Could you please check the set Linker Flag?
See similar post:

Best regards and Merry Christmas!

Dear Cate,

I have already tried to set the -undefined dynamic_lookup and it does not seem to work. It is also deprecated. I currently only have the -ObjC and the -lstdc++ flags linked. Also, adding the 'All load' flag does not change anything.

Best regards,


Dear Kevin,

Based on the log information, it looks like your certificate file was not properly added to your project: Can you please add it properly and see if it solves the issue?

Best regards,


Login or Signup to post a comment