Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'mysql.h' file not found #31

Open
MoridinBG opened this issue Apr 22, 2017 · 3 comments
Open

error: 'mysql.h' file not found #31

MoridinBG opened this issue Apr 22, 2017 · 3 comments
Labels
Milestone

Comments

@MoridinBG
Copy link

MoridinBG commented Apr 22, 2017

This seems similar to #16, but installing mysql via Homebrew did not help

I run vapor new --template=api --branch=beta and then add

.Package(url: "https://github.com/vapor/mysql-provider", Version(2,0,0, prereleaseIdentifiers: ["beta"]))

to Package.swift

Then both Xcode and vapor build fail with the above message.

I managed to fix this by adding /usr/local/include/mysql to the MySQL target in Xcode.
Then I got another message that lmysqlclient can not be found. This was fixed by adding libmysqlclient.dylib to Link Binary With Libraries Build Phase for MySQL and MySQLDriver and now everything builds and runs

I am using the latest version of the Toolbox on OS X 10.12.4 with MySQL 5.7.18 installed via homebrew.

@MoridinBG
Copy link
Author

brew install cmysql solved this.

Running vapor build --verbose shows it multiple times:

note: you may be able to install cmysql using your system-packager:
brew install cmysql

Maybe this should be explicitly stated

@tanner0101
Copy link
Contributor

This should be added to the http://beta.docs.vapor.codes/mysql/package/ page. Thanks for reporting!

@tanner0101 tanner0101 added the bug label Apr 25, 2017
@BrettRToomey BrettRToomey modified the milestones: 1.1, 2.0 May 3, 2017
@BrettRToomey
Copy link
Contributor

Nothing to see here 🕵️‍♀️

@tanner0101 tanner0101 added this to the 2.0 milestone May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants