Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLinking on Windows #587
Comments
This comment has been minimized.
Cobrand
commented
Jan 21, 2017
•
|
You should probably copy/paste libpq.a and .dll in C:<where you installed rust>\lib\rustlib\x86_64-pc-windows-gnu\lib [target.x86_64-pc-windows-msvc.pq]
rustc-link-search = ["C:\\Program Files\\PostgreSQL\\pg96\\lib"]
rustc-link-lib = ["pq"]or you could specify the lookup directly in your cargo command line, like so :
I am on linux myself so I can't say that these work for sure (at least the first one should), but at least it's something |
This comment has been minimized.
Timmmm
commented
Jan 21, 2017
|
I also found that the instructions in pq-sys worked, specifically set an environment variable How do I edit
|
This comment has been minimized.
Cobrand
commented
Jan 21, 2017
|
I edited my post |
This comment has been minimized.
Timmmm
commented
Jan 21, 2017
|
Ah this did the trick:
No need for the |
This comment has been minimized.
|
Looks like this has been resolved. You can also do this by adding the PG directory to your |
Timmmm commentedJan 21, 2017
It would be nice if the Readme explained how to compile this on Windows. As it stands I either get
ld: cannot find -lpqor and equivalent error forpq.libdepending on whether I'm using the-msvcor-gnutoolchains. It actually fails when compilingdiesel_codegen.I installed PostgreSQL using the BigSQL windows installer, and it put
libpq.aandlibpq.dllinC:\Program Files\PostgreSQL\pg96\libbut I have no idea how to tell cargo to look there and google did not help.