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

pkgconfig: Define OPJ_STATIC for static linking with pkgconf #1421

Merged
merged 1 commit into from
May 16, 2022
Merged

pkgconfig: Define OPJ_STATIC for static linking with pkgconf #1421

merged 1 commit into from
May 16, 2022

Conversation

Biswa96
Copy link
Contributor

@Biswa96 Biswa96 commented May 15, 2022

allows for the usage of $(pkgconf --static --cflags libopenjp2) to produce
the proper CFLAGS for static linking. Relies on pkgconf rather than pkg-config.

allows for the usage of $(pkgconf --static --cflags libopenjp2) to produce
the proper CFLAGS for static linking. Relies on pkgconf rather than pkg-config
@rouault rouault merged commit 86ae7d8 into uclouvain:master May 16, 2022
@Biswa96 Biswa96 deleted the pkgconf-static branch May 17, 2022 03:32
@Neumann-A
Copy link
Contributor

This is also required for the CMake targets. Unfortunally openjpeg uses add_definitions instead of properly adding the definitions to the targets via target_compile_definitions.

I currently see

opj_jpip_test.c.obj : error LNK2019: unresolved external symbol __imp_get_index_from_JP2file referenced in function main
opj_jpip_test.c.obj : error LNK2019: unresolved external symbol __imp_destroy_index referenced in function main
opj_jpip_test.c.obj : error LNK2019: unresolved external symbol __imp_output_index referenced in function main

due to that

@Biswa96
Copy link
Contributor Author

Biswa96 commented May 17, 2022

Feel free to add that. I was only seeing the static build issue in ffmpeg which uses pkgconfig files. And this change fixes it.

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

Successfully merging this pull request may close these issues.

3 participants