Skip to content

pkgconfig: Define OPJ_STATIC for static linking with pkgconf#1421

Merged
rouault merged 1 commit intouclouvain:masterfrom
Biswa96:pkgconf-static
May 16, 2022
Merged

pkgconfig: Define OPJ_STATIC for static linking with pkgconf#1421
rouault merged 1 commit intouclouvain:masterfrom
Biswa96:pkgconf-static

Conversation

@Biswa96
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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