I have Qt project that want to create a .deb package. My project can be found here
I found 1 tutorial about it, it can compile but I need to activate some flag on pro file like CONFIG+=USE_LIBUSB, I don't know how to put those flag, because the tutorial is not fully explains.
Is there any tutorial how to build Qt project to .deb?
Related
I'm trying to run this project:
https://github.com/vanhsati/SNMP-Monitor
Downloaded net-SNMP from:
https://sourceforge.net/projects/net-snmp/files/latest/download
I get a lot of errors when I try to build project.
Example code from official net-SNMP wiki also includes only two ".h" files.
How can I properly link the library to QT creator?
Using Qt Creator (latest released version, "Qt Creator 5.0.3 based on Qt 5.15.2"), the default build steps when creating a new project using meson are wrong.
My project configuration is the following: I have my source code, meson build files in a directory which also contains the build directory named "build".
Here are the default build steps:
Here is what it should be:
Is there a way I can change the default build settings for every project? Can someone explain why Qt Creator doesn't have good build steps by default?
Tools > Options > Meson > Enable "Autorun meson".
Yeah, that's an easy fix.
I'm trying to install qml-material plugin from papyros in my Qt. I have completed these steps so far
Cloned qml-material repo from here
opened "qml-material.pro" file in repository's root directory in Qt Creator
Built the project in release. It created "libmaterial.so" and similar files in the build directory.
In the build directory executed "make install"
After this step I don't know what to do. Please correct me if I have done something wrong and guide me what do I do next in order to use this plugin in a project.
I want to create an installer for my Application. So, I have read about Qt Installer Framework and I tested the tutorial example and create the installer and everything work find with the example. But I have a doubt when I try to do the same process for my Application. When I compile the code a folder is created at the same level of my code:
MyApplication (my code)
build-MyApplication-Desktop_Qt_5_4_1_MinGW_32bit-Release (code compiled)
So my questions are:
What files of the compilation do I need to copy into the folder myinstaller/packages/vendor/ recommended by Qt Intaller Framework?
If I have dependencies of Qt like serialport, multimedia, and others, how do I insert these dependecies with Qt Installer Framework?
windeployqt.exe is what you want. Just run that on the command line and give it your executable as the argument. It will automatically copy in all the required Qt libraries and even provide the runtime redistributable installer. Then you can use the binarycreator to generate an installer.
You can put all the dependencies in myinstaller/packages/vendor/data, along with your exe. and eventual additional files. I recommended using i.e. dependency walker for finding all the required dependencies. Some of the binarycreator tutorials on qt are outdated; make sure you use the command
<location-of-ifw>\binarycreator.exe -t <location-of-ifw>\installerbase.exe -p <package_directory> -c <config_directory>\<config_file> <installer_name>
with the appropriate arguments.
I have a prebuilt version of netcdf Library which I've downloaded from the Unidata website,
Now I am trying to link this Library to Qt 5, to use it in my Qt project. So I looked for some solutions in the internet and I found that I should add these lines to my Project.pro :
LIBS += -LC:/netcdf/lib -lnetcdf
INCLUDEPATH += C:/netcdf/include
But after runing the project, it doesn't work, so I rerun it with the debuger and it shows me this Message Box (titled "executable Failed") : During startup program exited with code 0xc0000135
Please help !
The pre-built libraries are built using Microsoft Visual Studio. As I recall, the C/C++ compiler the Qt SDK uses on Windows is a mingw-variant of gcc. I am not certain if the pre-built netcdf libraries are compatible with the mingw runtime, but it is usually not a good idea to mix C runtimes anyways.
I'm assuming you are using Qt Creator; if so, then it may be easier than you think to compile the netcdf-c libraries yourself. Because the netcdf-c project uses CMake, you will be able to open it as a project in Qt Creator.
Prerequisites
You will need the following:
cmake: http://cmake.org
netcdf-c source code: http://github.com/Unidata/netcdf-c/releases
NetCDF Dependencies
Note that you will need to install the following dependencies first, depending on the functionality you want from the netcdf library.
NetCDF4 support requires libhdf5 and libhdf5_hl, both provided by the hdf5 package available from http://www.hdfgroup.org.
DAP support requires libcurl. Google should be able to help you find this.
If you do not need these capabilities, you'll be fine with a straight netcdf-classic install.
Opening netcdf-c as a project in Qt Creator
Launch Qt Creator
Go to file->open project
Navigate to the netcdf-c source directory and open the CMakeLists.txt file.
This will load the netcdf source as a new project in Qt Creator. At this point it should be pretty straight forward to compile netcdf and install it somewhere on your system to use with your project.
Incorrect Assumption
If my assumption that you are using Qt Creator is wrong, this is all still possible from the command line; it will be, however, a little more involved.