Skip to content

Linking issue on Windows when building examples with clang-cl #93

@clement-troesch

Description

@clement-troesch

Hi there,

I'm currently trying to build a small test app with Odil on Windows 10 using clang-cl (VS 2022) but I get linking issue due to unresolved external symbols.

The issue also appears when building the examples, this is how I configure Odil with the examples:

cmake `
 -DWITH_DCMTK=OFF `
 -DBUILD_TESTING=OFF `
 -DBUILD_PYTHON_WRAPPERS=OFF `
 -DBUILD_JAVASCRIPT_WRAPPERS=OFF `
 -DBUILD_EXAMPLES=ON `
 -DICU_ROOT="<path_to_icu>"" `
 -DICU_UC_LIBRARY_RELEASE="<path_to_icu>"\lib\icuuc.lib" `
 -DJsonCpp_LIBRARY="<path_to_jsoncpp>\lib\jsoncpp.lib" `
 -DJsonCpp_INCLUDE_DIR="<path_to_jsoncpp>\include" `
 -DCMAKE_INSTALL_PREFIX="../install" `
 -DCMAKE_CXX_COMPILER="clang-cl.exe" `
 -DCMAKE_C_COMPILER="clang-cl.exe" `
 -DCMAKE_RC_COMPILER="llvm-rc.exe" `
 -DCMAKE_LINKER="link.exe" `
 -DCMAKE_C_FLAGS="-m64" `
 -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -m64 /EHa" `
 ../odil -G "NMake Makefiles JOM"

(Note: Boost, ICU and JsonCpp have all been built with clang-cl as well)

Here are the linking issues displayed in the compilation log:

When listing the symbols of the library using DUMPBIN /EXPORTS odil.lib it looks like the symbols are not available:

Do you have any idea on what I might be doing wrong?

Thanks a lot,

Clément

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions