Skip to content

Commit

Permalink
Merge pull request #48 from walkingsmarts/master
Browse files Browse the repository at this point in the history
Add instructions for macports
  • Loading branch information
tanner0101 authored Sep 11, 2016
2 parents ad5763b + f1cd8f9 commit 81c3e19
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ No need to worry about closing the connection.

### macOS

#### Using brew

Install MySQL

```shell
Expand All @@ -81,12 +83,29 @@ mysql.server start

Link MySQL during `swift build`

```swift
```shell
swift build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/lib
```

`-I` tells the compiler where to find the MySQL header files, and `-L` tells the linker where to find the library. This is required to compile and run on macOS.

#### Using macports

Install MySQL

```shell
sudo port install mysql57
sudo port select mysql mysql57
```
Link MySQL during `swift build`
```shell
swift build -Xswiftc -I/opt/local/include/mysql57/mysql/mysql -Xlinker -L/opt/local/lib/mysql57/mysql
```
`-I` tells the compiler where to find the MySQL header files, and `-L` tells the linker where to find the library. This is required to compile and run on macOS.
### Linux
Install MySQL
Expand Down

0 comments on commit 81c3e19

Please sign in to comment.