Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Link error duplicate reference for VTK and QT when building for webasm: free type
Forum Updated to NodeBB v4.3 + New Features

Link error duplicate reference for VTK and QT when building for webasm: free type

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 301 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cebuger
    wrote on last edited by cebuger
    #1

    I am trying to build an application that was previously built by an old developer in QT and VTK, but unfortunately he did not gave further instructions so I am trying to build it again and trying to reproduce his steps.

    Anyways, I have built my QT for web asm using the following configure

    configure.bat -qt-host-path C:\Qt\6.5.0\mingw_64 -no-warnings-are-errors -feature-opengles3  -device-option QT_EMSCRIPTEN_ASYNCIFY=1 -platform wasm-emscripten -prefix $PWD/qtbase
    

    I set-up I set qmake.bat from C:\Qt\6.5.0\wasm_singlethread\bin as environment variable

    I built VTK 9.2.6 using this configuration

    emcmake cmake . -B C:\build-vtk-wasm -GNinja -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DVTK_ENABLE_LOGGING:BOOL=OFF -DVTK_ENABLE_WRAPPING:BOOL=OFF -DVTK_MODULE_ENABLE_VTK_hdf5:STRING=NO -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2:STRING=DONT_WANT -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT -DVTK_MODULE_ENABLE_VTK_RenderingCellGrid:STRING=NO -DVTK_MODULE_ENABLE_VTK_sqlite:STRING=NO -DCMAKE_INSTALL_PREFIX=C:\vtk-install
    

    Built my application and ran
    mingw32-make

    My application does build but failed on linking, apparently the freetype library in VTK is conflicting or contains the same functions with the one in QT

    wasm-ld: error: duplicate symbol: FT_GlyphLoader_CreateExtra
    >>> defined in ../../dependencies/VTK-9.2.6/lib\\libvtkfreetype-9.2.a(ftbase.c.o)
    >>> defined in C:/Qt/6.5.0/wasm_singlethread/lib/libQt6BundledFreetype.a(ftbase.c.o)
    
    wasm-ld: error: duplicate symbol: ft_mem_realloc
    >>> defined in ../../dependencies/VTK-9.2.6/lib\\libvtkfreetype-9.2.a(ftbase.c.o)
    >>> defined in C:/Qt/6.5.0/wasm_singlethread/lib/libQt6BundledFreetype.a(ftbase.c.o)
    

    Anyone got an idea?

    Can I disable can I disable Qt6BundledFreetype in QT? How to?

    This is related to:
    https://forum.qt.io/topic/150648/im-getting-opengl-error-unknown-type-name-pfnglpushdebuggroupproc-did-you-mean-pfnglpushdebuggroupkhrproc

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved