LoginSignup
0
0

More than 5 years have passed since last update.

Perfect-MySQL library not found for -lmysqlclient for architecture x86_64 with Xcode & brew

Last updated at Posted at 2017-10-24

1. install mysql

$ brew install mysql

2. make xcodeproj

import PackageDescription
let package = Package(
    name: "PerfectTemplate",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", majorVersion: 3),
        .Package(url: "https://github.com/PerfectlySoft/Perfect-MySQL.git", majorVersion: 3)
    ]
)
swift package generate-xcodeproj
open [yourproject].xcodeproj

3. Xcode build and Error

Xcode -> Product -> Build
library not found for -lmysqlclient for architecture x86_64

Solution

swift build -Xlinker -L/usr/local/lib
swift test -Xlinker -L/usr/local/lib
swift package -Xlinker -L/usr/local/lib generate-xcodeproj

Refers

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0