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

How to build for windows? #158

Closed
bbirchnz opened this issue May 1, 2023 · 3 comments
Closed

How to build for windows? #158

bbirchnz opened this issue May 1, 2023 · 3 comments

Comments

@bbirchnz
Copy link

bbirchnz commented May 1, 2023

Hi, could anyone point me to a minimum working guide for building and running this on windows? I'm not familiar with pkg-config but have built Proj using the instructions on https://proj.org/install.html#build-requirements, note that its installed into c:/OSGeo4W, created pc files (with guessed contents), added that path to PKG_CONFIG_PATH. This got georust/proj to build, but I believe its probably just tricked its way through cmake, as when I try and run a test I get hard exits with code 3221225595 (I believe this is something to do with DLL misconfigured).

I don't know if there is anywhere I can drop the proj.dll into the cargo build directories?

@lnicola
Copy link
Member

lnicola commented May 1, 2023

Does enabling the bundled_proj feature help? It will give you another libproj (built from source), which may or may not be fine for your use case.

Otherwise I can't really help, but looking at https://github.com/georust/proj/blob/main/proj-sys/build.rs, there doesn't seem to be much in the way of manually specifying library paths.

@urschrei
Copy link
Member

urschrei commented May 1, 2023

This may also help: #79 (comment)

@bbirchnz
Copy link
Author

bbirchnz commented May 1, 2023

Thanks! #79 got a good easy build, and I redirected PKG_CONFIG_PATH. doing pkg-config --list-all now lists all the libs as you'd expect (proj, libtiff, curl etc).

Unfortunately, trying to run rust tests fails with missing DLLs - (exit code: 0xc0000135, STATUS_DLL_NOT_FOUND).

This is building proj with or without "pkg_config". Building with bundled_proj fails, still says it can't find sqlite3 or libtiff. Is cmake looking elsewhere?

Edit: grabbing all the DLL out of vcpkg/bin and dumping them alongside the compiled rust exe worked. Thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants