OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
858 stars 152 forks source link

Windows 10 building problems #313

Closed verdepoofie closed 2 years ago

verdepoofie commented 2 years ago

Problem: Windows 10 build fails at creation *.exe file:

11:44:42: Running steps for project OpenHantekProject...
11:44:42: Starting: "PATHTOCMAKE\CMake\bin\cmake.exe" --build PATHTOBUILDFOLDER/build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug --target all
[1/3 3.8/sec] Automatic MOC and UIC for target OpenHantek
[2/2 1.6/sec] Linking CXX executable openhantek\OpenHantek.exe
FAILED: openhantek/OpenHantek.exe 
cmd.exe /C "cd . && "PATHTOCMAKE\CMake\bin\cmake.exe" -E vs_link_exe --intdir=openhantek\CMakeFiles\OpenHantek.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\OpenHantek.rsp  /out:openhantek\OpenHantek.exe /implib:openhantek\OpenHantek.lib /pdb:openhantek\OpenHantek.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  && cmd.exe /C "cd /D C:\Users\Zaytseva.D\Documents\hantek\build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug\openhantek && "C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/Zaytseva.D/Documents/hantek/build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug/fftw/libfftw3-3.dll C:/Users/Zaytseva.D/Documents/hantek/build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug/openhantek && cd /D C:\Users\Zaytseva.D\Documents\hantek\build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug\openhantek && "C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/Zaytseva.D/Documents/hantek/build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug/libusb-1.0.21-win/64/libusb-1.0.dll C:/Users/Zaytseva.D/Documents/hantek/build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug/openhantek && cd /D C:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin && C:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin\qtenv2.bat && C:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin\windeployqt --no-translations C:/Users/Zaytseva.D/Documents/hantek/build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug/openhantek/Debug/OpenHantek.exe""
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!
"PATHTOBUILDFOLDER\build-OpenHantek-openhantek-e7e0c7b-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug\openhantek\Debug\OpenHantek.exe" does not exist.

ninja: build stopped: subcommand failed.
11:44:43: The process "C:\Program Files\CMake\bin\cmake.exe" exited with code 1.
Error while building/deploying project OpenHantekProject (kit: Desktop Qt 5.12.12 MSVC2017 64bit)
When executing step "Build"
11:44:43: Elapsed time: 00:01.

I was tryng to build in QTCreator with QT version 5.12

Ho-Ro commented 2 years ago

You could check how I build the windows binaries.

verdepoofie commented 2 years ago

I fixed. the problem was in created post-build.bat file in line 28. There it was trying to reach OpenHantek.exe in /PATH/openhantek/Debug/OpenHantek.exe which didn't exist. I corrected the path in that line to /PATH/openhantek/OpenHantek.exe and it worked. My apologies for the bothering.