You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linking with the ztd.text library results in the addition of a global macro dl (Ubuntu 22, GCC11):
#include <ztd/text.hpp>
int maint () {
int dl = 0; // compilation error
return 0;
}
The suggested solution is to move CMAKE_DL_LIBS from target_compile_definitions to target_link_libraries.
Before:
target_compile_definitions(ztd.encoding_tables
PRIVATE
ZTD_ENCODING_TABLES_BUILD=1
PUBLIC
$<$<STREQUAL:$<TARGET_PROPERTY:ztd.encoding_tables,TYPE>,SHARED_LIBRARY>:ZTD_ENCODING_TABLES_DLL=1>
${CMAKE_DL_LIBS}
)
After:
target_compile_definitions(ztd.encoding_tables
PRIVATE
ZTD_ENCODING_TABLES_BUILD=1
PUBLIC
$<$<STREQUAL:$<TARGET_PROPERTY:ztd.encoding_tables,TYPE>,SHARED_LIBRARY>:ZTD_ENCODING_TABLES_DLL=1>
)
target_link_libraries(ztd.encoding_tables
PUBLIC
${CMAKE_DL_LIBS}
)
The text was updated successfully, but these errors were encountered:
Linking with the
ztd.text
library results in the addition of a global macrodl
(Ubuntu 22, GCC11):The suggested solution is to move
CMAKE_DL_LIBS
from target_compile_definitions to target_link_libraries.Before:
After:
The text was updated successfully, but these errors were encountered: