sgrif / mysqlclient-sys

Rust bindings for libmysqlclient
Apache License 2.0
37 stars 32 forks source link

Cannot build mysqlclient-sys #26

Closed Davichet-e closed 4 years ago

Davichet-e commented 4 years ago

Hello! I'm trying to install the diesel-cli and I'm experiencing some problems during installation. I get this error when I try to run cargo install diesel_cli:

error: could not find native static library `mysqlclient`, perhaps an -L flag is missing?                                                              

error: aborting due to previous error                                                                                                                  

error: could not compile `mysqlclient-sys`.                                                                                                            

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed  

I've taken a look at other similar issues but nothing solves my problem. I've also read the README.md of this crate and I installed vcpkg, but I got some weird errors installing vcpkg install libmysql:x64-windows and I have commented on a issue that was already open to try to fix it (issue here)

I also installed pkg-config following this question with the dependencies but I don't really know what do I have to do with this library. In general I would say I do not have clear what are the steps to follow in order to fix the original error.

Thank you all for your patience and thanks in advance.

Davichet-e commented 4 years ago

I fixed taking a look on this page https://steemit.com/programming/@mrblueberry/installing-rust-and-diesel-for-rocket-on-windows-10 and setting the enviroment variable of MYSQLCLIENT_LIB_DIR the corresponding value. I proceed to close the issue