I can't compile diesel_cli when i try this command : cargo install diesel_cli --no-default-features --features postgres.
The full error message : https://pastebin.com/vVRK3cxi
I have set PATH in user variables
C:\PostgreSQL\pg10\lib
C:\PostgreSQL\pg10\bin
I know, some people already had this kind of errors in past but after some time, i don't find a solution =/
Thanks for your attention!
You should remove \lib from your path. You cannot statically link libpq with msvc. You only need the bin directory on your path.
You can also just run pg_env.bat which does all the setup needed for you.
Thank you a lot for your very fast response !
But me, i was long because i have do some test whitout succefull solution until I install PostgreSQL with EnterpriseDB installer (not BigSQL as i did). And finally with your instructions it works ! Thank you a lot ! <3
I think we should add these instructions in documentation, it can help some people =)
Feel free to open a pull request to https://github.com/diesel-rs/diesel/blob/master/guide_drafts/backend_installation.md with Windows steps that work for you. Unfortunately, I don't use Windows for development, so I'm not the best person to document how to link libpq on that platform.
@sgrif that backend_installation.md worked me for compile but not working well.
diesel setup 馃憤 works
diesel migration generate create_posts 馃憤 works
diesel migration run 馃憥 not works
diesel migration list 馃憥 not works
I follwed this link
https://diesel.rs/guides/getting-started/
why not works in windows?
@top1st Without saying what does not work nobody can and will help you.
Most helpful comment
You should remove
\libfrom your path. You cannot statically link libpq with msvc. You only need the bin directory on your path.