How To Compile EZCAP_Qt In Your Linux Device
$ sudo apt-get install cmake
$ cmake --version
If you can get the version with "cmake --version" command,it is successful to install.
2.Install libusb-1.0 library
$ sudo apt-get update $ sudo apt-get install libusb-1.0-*
3.Install OpenCV library
$ unzip opencv-3.4.3.zip
$ cd opencv-3.4.3 $ mkdir build
$ cd build $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..
$ make $ sudo make install
$ sudo nano /etc/ld.so.conf
文本末尾添加“/usr/local/lib”，按下Ctrl + O，回车保存修改，Ctrl + X退出修改(Add "/usr/local/lib" in the text end,push "Ctrl + O" and "Enter" to save modification,and push "Ctrl + X" to exit)
$ sudo ldconfig
1.You can choose other version OpenCV,but it maybe generate other compile issue because of compatibility,you can find other version OpenCV library on their official website(https://opencv.org/),or search on SourceForge(https://sourceforge.net/).
2.The speed of compiling OpenCV library will a little slow,please wait patiently.
3.If you dp it on RPI or other minitype devic,the device maybe generate system jammed issue because of performance,now,you need power off the device and restart it and continue to compile.
4.If you dp it on RPI or other minitype devic,please pay attention to heat dissipation.
4.Install Qt Creator
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install qt5-default
$ sudo apt-get install qtcreator
1.If system note "404 Not Found" issue when execute "sudo apt-get update" on RPI,you need modify device DNS，
$ sudo nano /etc/resolv.conf
(Modify 127.0.1.1 to 18.104.22.168,push "Ctrl + O" and "Enter" to save modification,and push "Ctrl + X" to exit
$ service network restart
2.In most cases,Qt Creator will auto configure compile kits after install,but somtimes,an unconfigured or misconfigured build suite will occurs,so you need check it by yourself,the method of check as follow ：
$ sudo qtcreator
After Qt Creator has been run,click Tools->Options->Kits,check if the kits has error note,if has error,please configure kits as follow，
Setup compiler:click Add and select MinGW,choose teh path of g++ compiler,ABI choose arm-linux-gnueabihf-elf；
2.Setup compile kits:choose the MinGW you setuped just now to be compiler,and choose debuger；
5.Download and Install QHYCCD SDK
(Please download the corresponding version of the SDK according to the Linux version you are using. You can check the Linux version used by the "uname -a" command.)，
(If the result is x86_32, it corresponds to Linux)；
(If the result is x86_64, it corresponds to Linux_x64)；
(If the result is armv7l, it corresponds to RPI3)；
(If the result is aarch64, it corresponds to AARCH64)。
(This time with armhf as an example)，
$ tar -xvf RPI3_qhyccd_V20191115_0.tgz
$ cd RPI3_qhyccd_V20191115_0
$ chmod 777 *.sh
$ sudo ./install.sh
6.(Download EZCAP_Qt source code and compile it)
$ unzip EZCAP_QT.zip
$ sudo qtcreator
(After running the Qt Creator program, you need to do the following)：
6.1 (Click File->Open File or Project,enter the EZCAP_QT directory that was just extracted)
6.2(Select the build suite and click the Configure Project button)
6.3 (Open and modify EZCAP.pro file)
The description of modification:
1.INCLUDEPATH is the location of the header files. The header files of QHYCCD SDK and OpenCV will be saved to the /usr/local/ include directory after installation; the header files of libusb-1.0 need to be passed "sudo find / -name libusb.h". Find the location of the file and modify it accordingly.
2. LIBS is the location of the library files. Both the QHYCCD SDK and OpenCV library files are installed in the "/usr/local/lib" directory. The locations of the cfitsio and libusb-1.0 library files are stored in the system library directory.
The path of armv7l is /usr/lib/arm-linux-gnueabihf;
the path of aarch64 is / usr / lib / aarch64-linux-gnu;
The path of x86_32 is / usr / lib / x86_32-linux-gnu;
The path of x86_64 is / usr / lib / x86_64-linux-gnu;
You need to modify it according to the actual situation. The above picture uses armv7l as an example. If it is an aarch64 device, you need to modify it to "LIBS + = / usr / lib / aarch64-linux-gnu -lusb-1.0 -lcfitsio".
6.4 (Modify the three files qhyccdStatus.h, main.cpp and myStruct.h according to the following figure. After modification, select Release mode in the lower left corner and click the compile button to start compiling)
6.5 (Compile successfully)