Solved How to use KDCharts from GitHub on Windows?
-
Hi,
Re: can't install KD ReportsThis topic is from 2017. Now the year is 2020 and I can not install and use this library unfortunatelly.
I asked to KDAB and they said that they stopped maintenance the library.
Is there anyone who can install and use this library in their Qt projects?!
Especially the Gantt Diagram.
Regards,
Mukcip:) -
- Install MSVC (aka Visual Studio)
- Install Qt5 for MSVC
- Install CMake (https://cmake.org/)
- open a command prompt and run both
qtenv2.bat
(from the Qt folder) andvcvarsall.bat x64
(from the Visual Studio Folder) - Prepend the path to cmake.exe to your PATH env variable:
SET PATH=C:\Program Files\CMake;%PATH%
- download the sources of kdchart
- navigate the command prompt to that folder
- Run the following commands:
mkdir build cd build cmake -G "NMake Makefiles" -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=C:/KDCharts -DCMAKE_BUILD_TYPE=DEBUG ../ cmake --build . cmake --build . --target install cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:/KDCharts -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install
-
As always: what did you do and what did not work?
-
Hi,
I use Qt 5.13.2 on Win10x64I followed what the install.txt says.
I run python autogen.py and created cofigure.bat.and the result is:
C:\Users\mucip\Documents\Qt\KDChart>configure.bat Qt found: C:/Qt/5.13.2/msvc2017_64 Release.................: yes (default: yes) Shared build............: yes (default: yes) Compiled-In Unit Tests..: no (default: no) Project ERROR: Cannot run compiler 'cl'. Output: =================== =================== Maybe you forgot to setup the environment? qmake failed C:\Users\mucip\Documents\Qt\KDChart>
Regards,
Mucip:) -
@Mucip If you're using Microsoft compiler then you should start the MSVC console where everything is prepared and build in that console.
-
Hi @jsulm ,
This is also msvc2017 64-bit console...Regards,
Mucip:) -
@Mucip And you can run cl.exe from that console?
Did you check the configure log? -
Hi @jsulm ,
Interesting?C:\Users\mucip\Documents\Qt\KDChart>cl.exe 'cl.exe' is not recognized as an internal or external command, operable program or batch file.
Regards,
Mucip:) -
@Mucip Are you sure you're using the MSVC console?
You can try to add the path to cl.exe directory to PATH before calling configure.exe, but I fear you will have other issues. -
Hi @jsulm,
Did I wrong?
I will execute this console:C:\Windows\System32\cmd.exe /A /Q /K C:\Qt\5.13.2\msvc2017_64\bin\qtenv2.bat
By the way where is cl.exe?
Regards,
Mucip:) -
@Mucip There should be an entry in the start menu for that
-
@jsulm ,
Yes. there is link in the start menu .Where is cl.exe? Or where shoul I install it?
Regards,
Mucip:) -
@Mucip said in How to use KDCharts from GitHub on Windows?:
Yes. there is link in the start menu
So, did you try to use it?
"Where is cl.exe?" - simply use search function in Windows Explorer.
-
Hi @jsulm ,
I will from Google this.I added it to path
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64
It satart to compile. When I run nmake some lines appear in the console but error come up:
'rc' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'rc' : Return code '0x1' Stop. NMAKE : fatal error U1077: 'cd' : Return code '0x2' Stop. C:\Users\mucip\Documents\Qt\KDChart>
Regards,
Mucip:) -
@Mucip You still did not answer the question regarding MSVC console short-cut in start menu: did you try to use it?
And there is actually no need for an YouTube video to find a file... -
@jsulm ,
Yes I use MSVC2017 64 bit console from start menu which comes with Qt instalation.Regards,
Mucip:) -
@jsulm
I added rc.exe and others in the PATH and restart configure.bat and nmake command.nmake result error message is:
rc /NOLOGO -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -DUSE_EXCEPTIONS -DKDCHART_VERSION=200 -DKDCHART_MASTER_CVS -DQT_FATAL_ASSERT -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -DQBA_NO_CAST_TO_VOID -DQBA_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DNOMINMAX -D_USE_MATH_DEFINES -DKDCHART_SHAREDLIB -DKDCHART_BUILD_KDCHART_LIB -DQT_NO_KEYWORDS -Demit= -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D_WINDLL -fo release\_obj\kdchart_resource.res kdchart_resource.rc kdchart_resource.rc(1) : fatal error RC1015: cannot open include file 'windows.h'. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\rc.EXE"' : Return code '0x1' Stop. NMAKE : fatal error U1077: 'cd' : Return code '0x2' Stop. C:\Users\mucip\Documents\Qt\KDChart>
Regards,
Mucip:) -
@Mucip said in How to use KDCharts from GitHub on Windows?:
Yes I use MSVC2017 64 bit console from start menu which comes with Qt instalation.
But you have Visual Studio 2019? I'm not sure it is going to work. You can try the console from Visual Studio - I'm not a Visual Studio expert but I think there is a console.
-
- Install MSVC (aka Visual Studio)
- Install Qt5 for MSVC
- Install CMake (https://cmake.org/)
- open a command prompt and run both
qtenv2.bat
(from the Qt folder) andvcvarsall.bat x64
(from the Visual Studio Folder) - Prepend the path to cmake.exe to your PATH env variable:
SET PATH=C:\Program Files\CMake;%PATH%
- download the sources of kdchart
- navigate the command prompt to that folder
- Run the following commands:
mkdir build cd build cmake -G "NMake Makefiles" -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=C:/KDCharts -DCMAKE_BUILD_TYPE=DEBUG ../ cmake --build . cmake --build . --target install cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:/KDCharts -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install
-
Hi @VRonin ,
I applied your list but there is error. I think it's because of VS2019 or my path variables?!C:\Users\mucip\Documents\Qt\KDChart\build>cmake -G "NMake Makefiles" -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=C:/KDCharts -DCMAKE_BUILD_TYPE=DEBUG ../ -- The CXX compiler identification is MSVC 19.23.28106.4 -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe - broken CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeTestCXXCompiler.cmake:53 (message): The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/mucip/Documents/Qt/KDChart/build/CMakeFiles/CMakeTmp Run Build Command(s):nmake /nologo cmTC_f17e3\fast && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64\nmake.exe" -f CMakeFiles\cmTC_f17e3.dir\build.make /nologo -L CMakeFiles\cmTC_f17e3.dir\build Building CXX object CMakeFiles/cmTC_f17e3.dir/testCXXCompiler.cxx.obj C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1423~1.281\bin\Hostx64\x64\cl.exe @C:\Users\mucip\AppData\Local\Temp\nm72D3.tmp testCXXCompiler.cxx Linking CXX executable cmTC_f17e3.exe "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_f17e3.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1423~1.281\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\cmTC_f17e3.dir\objects1.rsp @C:\Users\mucip\AppData\Local\Temp\nm745B.tmp LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1423~1.281\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\cmTC_f17e3.dir\objects1.rsp /out:cmTC_f17e3.exe /implib:cmTC_f17e3.lib /pdb:C:\Users\mucip\Documents\Qt\KDChart\build\CMakeFiles\CMakeTmp\cmTC_f17e3.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_f17e3.dir/intermediate.manifest CMakeFiles\cmTC_f17e3.dir/manifest.res" failed (exit code 1104) with the following output: LINK : fatal error LNK1104: 'kernel32.lib' dosyas² a²lam²yor NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : D÷n³■ kodu '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64\nmake.exe"' : D÷n³■ kodu '0x2' Stop. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:40 (project) -- Configuring incomplete, errors occurred! See also "C:/Users/mucip/Documents/Qt/KDChart/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/mucip/Documents/Qt/KDChart/build/CMakeFiles/CMakeError.log". C:\Users\mucip\Documents\Qt\KDChart\build>
Regards,
Mucip:) -
@Mucip said in How to use KDCharts from GitHub on Windows?:
I think it's because of VS2019 or my path variables?!
Did you run
vcvarsall.bat x64
as mentioned in step 4? and I don't mean double-clicking on the file but using the command line to execute them