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

Windows proj.lib instead of/in additon to proj_<major>_<minor>.lib #1479

Closed
snowman2 opened this issue May 23, 2019 · 5 comments
Closed

Windows proj.lib instead of/in additon to proj_<major>_<minor>.lib #1479

snowman2 opened this issue May 23, 2019 · 5 comments

Comments

@snowman2
Copy link
Contributor

Thoughts on this?
conda-forge/proj.4-feedstock#46

Are there reasons that this has not been done already?

@snowman2 snowman2 changed the title Windows proj.lib instead of/in additon to proj_<major>_<minor> Windows proj.lib instead of/in additon to proj_<major>_<minor>.lib May 23, 2019
@kbevers
Copy link
Member

kbevers commented Jun 24, 2019

For the lazy that can't be bothered to click the link (myself including, hence the long answer time):

The linked issue adresses that on Windows the CMake build will output proj_6_1.lib and not proj.lib. This causes problems since packages depending on PROJ need to be updated every time a new version of PROJ is released.

What is common practice on Windows regarding this? Is it always just <name>.lib with no mentioning of the version number? If so, how is compatibility between versions evaluated?

Would it be sufficient (and possible?) to create a symbolic link to the versioned lib-file?

@busstoptaktik
Copy link
Member

If so, how is compatibility between versions evaluated?

@kbevers since this is for static linking, at least the case of trying to call new API entries on an old .lib will be diagnosed by the linker at link time. And once the material is statically linked it doesn't matter what you do the the installed .lib, since its relevant parts will have been statically included in the .exe

@kbevers
Copy link
Member

kbevers commented Jun 24, 2019

Right, so no real consequences of switching to producing a proj.lib file? If so, we should make that change with version 7, as this is somewhat a breaking change.

@JackBoosY
Copy link

Hi @kbevers @busstoptaktik , I'm recently upgrading the proj version in vcpkg(PR #7192), and then I found that the name generated by proj in Windows and Unix is inconsistent. Some proj-dependent libraries (such as gdal and liblas) use proj's default library name in windows as proj.lib, which is obviously inconsistent with the generated name.

To solve this problem, we have two ways:

  1. Fix the library name generated by proj as proj, but this obviously violates your original intention (refer to cmake/ProjUtilities.cmake: 105).
  2. Fix the name of the libraries that depends on proj in each of the erroneous ports.

So, I want to hear from your authors.

Thanks.

@kbevers
Copy link
Member

kbevers commented Jul 29, 2019

I think we should change the CMake setup so that proj.lib is always created. As far as I can tell it is what most people expect to get.

This is a breaking change of sorts so I would like to wait with this change until the PROJ 7 release next year. If it is desirable to downstream projects to have this change sooner (PROJ 6.2.0) I am happy to accept a PR that implements a proj.lib symlink to the proj_<major>_<minor>.lib fil. Or just a copy of the file - whatever works.

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

4 participants