githubuser0xFFFF/Qt-Advanced-Docking-System

Windows 10: CMake building issues with Qt6.6.2

kyrlon opened this issue · 3 comments

I am attempting to install Qt-Advanced-Docking-System on my Windows 10 system but I am coming across an error:

PS C:\Users\kyrlon\Qt-Advanced-Docking-System> mkdir build


    Directory: C:\Users\kyrlon\Qt-Advanced-Docking-System


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         3/16/2024  11:46 AM                build


PS C:\Users\kyrlon\Qt-Advanced-Docking-System> cd .\build\
PS C:\Users\kyrlon\Qt-Advanced-Docking-System\build> cmake .. -G "MinGW Makefiles"
-- The CXX compiler identification is Clang 18.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features       
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- The C compiler identification is Clang 18.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (8.6s)
CMake Error: AUTOMOC for target qt6advanceddocking: Test run of "moc" executable "C:/Qt/Qt-6.6.2/./bin/moc.exe" failed.
C:/Qt/Qt-6.6.2/./bin/moc.exe -h

Exit code 0xc0000135

CMake Generate step failed.  Build files cannot be regenerated correctly.
PS C:\Users\kyrlon\Qt-Advanced-Docking-System\build> 

Can you try to build with qmake and can you also try to build with Qt 6.5.2 - thank you.

The CMake build support is a third party contribution. So you need to wait until someone fixes this or you try to fix this by yourself and provide a pull request. To fix this, try to build with CMake against nQt 6.5.2 and find out what is the difference to Qt 6.6.2

I was able to finally install Qt-ads with Qt6.6.2 after painfully installing from source for other reasons. The following commands were inspired from this post and the comment mentioned earlier about qmake:

PS C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System> mkdir build
PS C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System> cd build
PS C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System\build> qmake ..
PS C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System\build> mingw32-make
PS C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System\build> mingw32-make check 
PS C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System\build> mingw32-make install

Afterwards, I was able to run a docking demo with the application at
C:\Users\kyrlon\Downloads\Qt-Advanced-Docking-System-master\build\lib\AdvancedDockingSystemDemo.exe:
ads_Demo

Side note, I installed my mingw64 within my Program Files folder, but later found out that make is not so kind with spaces in path. Since qmake generates the makefile with the intention of using the make ENV variable, I modified my PATH ENV variable path/directory for the bin of mingw64 from C:\Program Files\mingw64\bin to to use short (8.3) short name to C:\Progra~1\mingw64\bin instead to avoid the spaces fiasco.