前提・実現したいこと
こちらのサイトを参考にiPadからMySQLに接続するプログラムを作成しています。
C言語用MySQLコネクタを入手し、フォルダへの配置やブリッジングヘッダーも作成済みです。
発生している問題・エラーメッセージ
ビルドが失敗し、リンクエラーが発生します。
Ld /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Products/Debug-iphonesimulator/Sample_Examination.app/Sample_Examination normal x86_64 (in target: Sample_Examination) cd /Users/workwork/Documents/workwork_APL/Sample_Examination export IPHONEOS_DEPLOYMENT_TARGET=12.2 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -L/Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Products/Debug-iphonesimulator -L/Users/workwork/Documents/workwork_APL/Sample_Examination/MySQL -F/Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Products/Debug-iphonesimulator -filelist /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Intermediates.noindex/Sample_Examination.build/Debug-iphonesimulator/Sample_Examination.build/Objects-normal/x86_64/Sample_Examination.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=12.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Intermediates.noindex/Sample_Examination.build/Debug-iphonesimulator/Sample_Examination.build/Objects-normal/x86_64/Sample_Examination_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Intermediates.noindex/Sample_Examination.build/Debug-iphonesimulator/Sample_Examination.build/Objects-normal/x86_64/Sample_Examination.swiftmodule -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Intermediates.noindex/Sample_Examination.build/Debug-iphonesimulator/Sample_Examination.build/Sample_Examination.app-Simulated.xcent -lmysqlclient -lc++ -Xlinker -dependency_info -Xlinker /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Intermediates.noindex/Sample_Examination.build/Debug-iphonesimulator/Sample_Examination.build/Objects-normal/x86_64/Sample_Examination_dependency_info.dat -o /Users/workwork/Library/Developer/Xcode/DerivedData/Sample_Examination-dvzoefovuxwvpmdkpqjocrvumavz/Build/Products/Debug-iphonesimulator/Sample_Examination.app/Sample_Examination Undefined symbols for architecture x86_64: "_readdir_r$INODE64", referenced from: _my_dir in libmysqlclient.a(my_lib.c.o) "_opendir$INODE64", referenced from: _yaSSL_CTX_load_verify_locations in libmysqlclient.a(ssl.cpp.o) _my_dir in libmysqlclient.a(my_lib.c.o) "_readdir$INODE64", referenced from: _yaSSL_CTX_load_verify_locations in libmysqlclient.a(ssl.cpp.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
試したこと
CleanBuildFolder、PC再起動も試しましたが解決しませんでした。
補足情報(FW/ツールのバージョンなど)
code10.2.1
mysql-connector-c-6.1.11-macos10.12-x86_64
よろしくお願いします。
あなたの回答
tips
プレビュー