Skip to content

utf8proc: set UTF8PROC_STATIC/do not set UTF8PROC_EXPORTS for static builds - #2958

Open
robUx4 wants to merge 1 commit into
mesonbuild:masterfrom
robUx4:utf8proc-dllexport
Open

robUx4 wants to merge 1 commit into
mesonbuild:masterfrom
robUx4:utf8proc-dllexport

Conversation

@robUx4

@robUx4 robUx4 commented Oct 9, 2026

Copy link
Copy Markdown

When UTF8PROC_STATIC is not set, on Windows builds the dllimport/dllexport is used for all public API's 1. This fails to link.

UTF8PROC_STATIC needs to be set for that.

And UTF8PROC_EXPORTS is a private define when building the DLL 23. When using the DLL it should not be set.

I submitted a patch to fix this in the CMake builds 4.

Fixes #2957

Footnotes

  1. https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L123 ↩

  2. https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L129 ↩

  3. https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/CMakeLists.txt#L40 ↩

  4. https://github.com/JuliaStrings/utf8proc/pull/370 ↩

@robUx4
robUx4 force-pushed the utf8proc-dllexport branch 2 times, most recently from 5535c64 to 7b1fdf1 Compare October 9, 2026 11:46
…builds

When UTF8PROC_STATIC is not set, on Windows builds the dllimport/dllexport is used
for all public API's [^1]. This fails to link.

UTF8PROC_STATIC needs to be set for that.

And UTF8PROC_EXPORTS is a private define when building the DLL [^2][^3].
When using the DLL it should not be set.

I submitted a patch to fix this in the CMake builds [^4].

Fixes mesonbuild#2957

[^1]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L123
[^2]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L129
[^3]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/CMakeLists.txt#L40
[^4]: JuliaStrings/utf8proc#370
@robUx4
robUx4 force-pushed the utf8proc-dllexport branch from 7b1fdf1 to 0ab47d7 Compare October 9, 2026 11:53

This branch has not been deployed

No deployments
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.

utf8proc .pc file is defining UTF8PROC_EXPORTS for static builds

1 participant