libpcap-dev doesnt worked in Qt Creator (C++, qt) - qt

Im trying to compile the project in QT Creator with libpcap-dev.
Before that I have done:
sudo apt install libpcap-dev
However, the compiler throws a bunch of errors at the output:
screenshot
CMakeLists.txt: https://pastebin.com/L9QbES6b
FindPCAP.cmake: https://pastebin.com/HTMxQUUk

Related

Unknown module(s) in QT: 3dstudioruntime2

I installed qt creator and qt 3dstudio with the qtOnline installer for linux. I want to build a project using these two packages. I design my project in qt3dstudio and then I use qtcreator to code the logic of the program. But I cannot import qt3dstudio module into the code.any suggestions??
I need to get this going on ubuntu 16.04LTS. I couldn't find anything useful on the web about the problem. I did try to build qt3dstudio but some of the dependencies caused my ubuntu desktop to stop working and I had to reinstall ubuntu.
QT modules in my .pro file:
QT += widgets qml quick gui 3dstudioruntime2
and when I hit build I get the following error:
Unknown module(s) in QT: 3dstudioruntime2

Qt Creator No CMake generators on raspberry pi

I have installed qt creator on raspberry pi. sudo apt-get install qtcreator. The program launches and seems to be working except when I load in a cmake project I cannot run cmake through qt creator because qt creator does not detect any cmake generators. When I run cmake -h from the command line there are many cmake generators listed. I want to use the standard Unix Makefiles generator. I have also checked that make is installed and working from the command line on my raspberry pi.
Other details: Running the latest Raspbian, qt creator 2.5, qt 4.8.2,
I had the same problem on Ubuntu after messing with my GCC installation. Maybe the following fix will also work on a Raspberry Pi:
Go to View -> Options -> Build & Run
Go to the "Kits" tab and make sure that a compiler is selected.
Go to the "CMake" tab and hit "Add" to specify the path to your cmake, e.g./usr/bin/cmake. Do this even if the same path is already there as an autodetected cmake.
Select your newly added cmake and hit "Make Default".

Qt Creator 3.0.0/1 with Clang -> g++' is not recognized

Win 7 32, Qt Creator 3.0 and 3.1beta tried
I try to compile a project with Clang in Qt Creator. According to "Qt Creator and Clang" I have set PATH / LLVM_INSTALL_DIR .
LLVM was downloaded from here. http://llvm.org/releases/download.html . Settings in Qt Creator as shown below (screenshots). When I run qmake, I get 'g++' is not recognized as an internal or external command, operable program or batch file.
Do I miss something in the big picture? Do I need to install a special Qt version (compiled for Clang)? I have a Qt 5.2 for MSVC and Qt 5.2. for MinGw on my disk.
I have tried 3.1beta as this reads as CLANG is supported, maybe I understand it wrong.
Compiler settings in Creator:
Kit:
Clang for Win32 is not supported by the stock qmake environment. Anyway, you can follow this answer to get it work. After that specify the exact spec for generating Makefile:
qmake -spec win32-clang.

qt creator needs a compiler set up to build. configure a compiler in the kit options, after adding compiler, cannot produce code for the qt version

alright.. i downloaded and installed qt 5.1.1 (msvc2012, 64 bit) on my windows 7. i tried to run a simple qt gui application... and this is what happened:
when i pressed "run"... there was error.. it said:
"qt creator needs a compiler set up to build. configure a compiler in the kit options"
then i found i had a list of 4 compilers to add from... when i added mingw... it said:
"the compiler mingw cannot produce codes for the qt version 'qt 5.1.1 MSVC2012 64 bit'"
it did the same for all the other compilers that i chose from the list of 4... nevertheless, i pressed "run" again.. as expected, it did not work... and this was the compile output:
19:16:31: Running steps for project code...
19:16:31: Starting: "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\qmake.exe" C:\Users\shades\code\code.pro -r -spec win32-g++
19:16:31: The process "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\qmake.exe" exited normally.
19:16:31: Starting: "mingw32-make.exe" -r -w
qtcreator_ctrlc_stub: Command line failed: mingw32-make.exe -r -w
19:16:32: The process "mingw32-make.exe" exited with code -1.
Error while building/deploying project code (kit: Desktop Qt 5.1.1 MSVC2012 64bit)
When executing step 'Make'
19:16:32: Elapsed time: 00:01.
what do i do?? please please help....
The Qt version youh have is for use with the compiler MSVC2012 64 bit. That compiler is for Microsoft Visual C 2012 64 bit.
You should download the MinGW version if you want to use that compiler. The installer of the mingw version of Qt comes with the compilers for MinGW.

Importing a CMake project in QtCreator

I'm trying to import my Cmake project in QtCreator, which I'd want to use as code editor, but with completition for Qt classes an the possibility to do the build via Ctrl+R
When importing the Cmake project, the QtCreator ide hangs when running CMakeWizard when I try to select RunCmake. If I cancel an empty windows pops up and the project is not generated.
Is it possible to import an existing cmake project in QtCreator?
Ubuntu 10.10 x86_64, QtCreator 2.6
Normally you just do "Open Project" and then select the CMakeLists.txt as the project file. QtCreator will then ask you to run CMake once (to generate a CodeBlocks build file, which is then interpreted by QtCreator). After that you have native support for your CMake project.
It even works with rather complicated CMake scripts.
If you observe hangs etc., you should probably file a bug report with the QtCreator project.
I had a similar issue when qtcreator crashed when opening cmake projects created in older versions of qtcreator. Removing CMakeLists.txt.user and running qt from terminal resolved issue for me.
cd /path/to/project/
qtcreator .

Resources