Install headers in corresponding directories - header-files

I am trying to install headers of my library using QMake. These headers gave a hierarchical order that must be applied on installation target as well. My current solution for this is to add many targets (each for one subdirectory):
...
headers.path = /usr/include/foo/widgets
headers_base.path = /usr/include/foo/widgets
headers_data.path = /usr/include/foo/widgets/data
headers_editors.path = /usr/include/foo/widgets/editors
...
HEADERS_BASE += \
foo.hpp \
bar.hpp
HEADERS_DATA += \
data/foo.hpp \
data/bar.hpp
HEADERS_EDITORS += \
editors/foo.hpp \
editors/bar.hpp
...
HEADERS += $$HEADERS_BASE \
$$HEADERS_DATA \
$$HEADERS_EDITORS
This is tedius and error-prune. I would like to use something simple and straightforward like nobase in autotools. Something like this:
magic_HEADERS += \
foo.hpp \
bar.hpp
data/foo.hpp \
data/bar.hpp
editors/foo.hpp \
editors/bar.hpp
Note
Having
HEADERS += \
foo.hpp \
bar.hpp
data/foo.hpp \
data/bar.hpp
editors/foo.hpp \
editors/bar.hpp
Installs all headers in a single directory.

Headers will be installed if you change .pro file with example:
HEADERS += \
include/widgets/foo.hpp \
include/widgets/bar.hpp \
include/widgets/data/foo.hpp \
include/widgets/data/bar.hpp \
include/widgets/editors/foo.hpp \
include/widgets/editors/bar.hpp
unix {
headers.path = /usr/local/include
headers.files = $$PWD/include/*
target.path = /usr/local/lib
INSTALLS += target headers
}

Related

How to link external DLLs properly in Qt creator

Am trying to build the project found # uconfig
, the project requires poppler and the author provided pre-built links
headers and DLLS
I have downloaded them and this is structure of the project
dll folder contains all the DLLS and poppler contains header files,
the pdf_extract.pro has the following content
QT += core gui widgets xml
TARGET = pdf_extract
TEMPLATE = lib
DEFINES += DATASHEET_EXTRACTOR_EXPORT_LIB
DESTDIR = "$$PWD/../../bin"
CONFIG(release, debug|release) {
CONFIG += optimize_full
}
SOURCES += \
$$PWD/datasheet.cpp \
$$PWD/datasheetpackage.cpp \
$$PWD/datasheetpin.cpp \
$$PWD/datasheetbox.cpp \
$$PWD/pdfdebugwidget/pdfdebugwidget.cpp \
$$PWD/pdfdebugwidget/pdfdebugviewer.cpp \
$$PWD/pdfdebugwidget/pdfdebugscene.cpp \
$$PWD/pdfdebugwidget/pdfdebugitempage.cpp \
$$PWD/pdfdebugwidget/pdfdebugitempin.cpp \
$$PWD/pdfdebugwidget/pdfdebugitemtextbox.cpp \
$$PWD/model/pdfdatasheet.cpp \
$$PWD/model/pdfpage.cpp \
$$PWD/model/pdftextbox.cpp \
$$PWD/model/pdfpin.cpp \
$$PWD/model/pdfcomponent.cpp \
$$PWD/controller/pdfloader.cpp
HEADERS += \
$$PWD/pdf_extract_common.h \
$$PWD/datasheet.h \
$$PWD/datasheetpackage.h \
$$PWD/datasheetpin.h \
$$PWD/datasheetbox.h \
$$PWD/pdfdebugwidget/pdfdebugwidget.h \
$$PWD/pdfdebugwidget/pdfdebugviewer.h \
$$PWD/pdfdebugwidget/pdfdebugscene.h \
$$PWD/pdfdebugwidget/pdfdebugitempage.h \
$$PWD/pdfdebugwidget/pdfdebugitempin.h \
$$PWD/pdfdebugwidget/pdfdebugitemtextbox.h \
$$PWD/model/pdfdatasheet.h \
$$PWD/model/pdfpage.h \
$$PWD/model/pdftextbox.h \
$$PWD/model/pdfpin.h \
$$PWD/model/pdfcomponent.h \
$$PWD/controller/pdfloader.h
LIBS += -L"$$PWD/../../bin"
LIBS += -L"$$PWD/dll/jpeg62.dll"
LIBS += -L"$$PWD/dll/libfreetype-6.dll"
LIBS += -L"$$PWD/dll/libopenjp2.dll"
LIBS += -L"$$PWD/dll/libpng12.dll"
LIBS += -L"$$PWD/dll/libpoppler-80.dll"
LIBS += -L"$$PWD/dll/libpoppler-qt5.dll"
LIBS += -L"$$PWD/dll/libtiff3.dll"
LIBS += -L"$$PWD/dll/zlib1.dll"
INCLUDEPATH += $$PWD/../../
LIBS += -lkicad
macx {
LIBS += -L /usr/local/lib
INCLUDEPATH += /usr/local/include
}
yet when I try to build the project I get these errors... am not sure what am doing wrong or missing
According to qmake documentation, using unix standards to specify linked libraries will work on Windows, too. Anyway, instead of
LIBS += -L"$$PWD/dll/jpeg62.dll"
I would try
LIBS += "-L$$PWD/dll" - ljpeg62
or just use Windows style:
LIBS += $$PWD/dll/jpeg62.dll
2 years late but i've also been wondering,
#include <QLibrary>
place your *.dll in your Debug/Release folder. e.g:
build-test-Desktop_Qt_6_1_2_MinGW_64_bit-Debug/debug
now simply:
QLibrary lib("myLibrary.dll");
if (!lib.load())
qDebug() << lib.errorString();
if (lib.load())
qDebug() << "library loaded";
alternatively, rather than placing the DLL in debug folder you can set the location of the dll to
c:/path/to/dll/yourdll.dll

Qt Gui and Phantom Omni

I'm working with an Haptic Device (" Phantom Omni"), and i'm creating a GUI, this gui has some headers and source files from the haptic device. I've already included them, but I have also include the libraries. I've tried all the several ways that I found on internet, but when I try to build the project it returns me error about LNK 2019 and LNK 2001.
I've checked also the Makefile that the qMake generates, and into this file there are the paths and libraries that i would to add, but I don't know why, I have always the some error.
The .pro file:
#LIBS += -L"C:\\Folder\\Folder2\\LibFolder" -lextlib.lib
QT += core gui
CONFIG += console
QT += gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = GUI_TeleManipulation
TEMPLATE = app
SOURCES += main.cpp\
gui_telemanipulation.cpp \
debug/moc_gui_telemanipulation.cpp \
src/Client.cpp \
src/PHANToM.cpp \
src/HDU/src/hdu.cpp \
src/HDU/src/hduAfx.cpp \
src/HDU/src/hduDecompose.cpp \
src/HDU/src/hduError.cpp \
src/HDU/src/hduHapticDevice.cpp \
src/HDU/src/hduLine.cpp \
src/HDU/src/hduLineSegment.cpp \
src/HDU/src/hduMatrix.cpp \
src/HDU/src/hduPlane.cpp \
src/HDU/src/hduQuaternion.cpp \
src/HDU/src/hduRecord.cpp \
src/hd.cpp
HEADERS += gui_telemanipulation.h \
ui_gui_telemanipulation.h \
include/Client.hpp \
include/matrix.h \
include/Packet.hpp \
include/PHANToM.h \
include/HD/hd.h \
include/HD/hdCompilerConfig.h \
include/HD/hdDefines.h \
include/HD/hdDevice.h \
include/HD/hdExport.h \
include/HD/hdScheduler.h \
include/HDU/hdu.h \
include/HDU/hduBoundBox.h \
include/HDU/hduError.h \
include/HDU/hduGenericMatrix.h \
include/HDU/hduHapticDevice.h \
include/HDU/hduLine.h \
include/HDU/hduLineSegment.h \
include/HDU/hduMath.h \
include/HDU/hduMatrix.h \
include/HDU/hduPlane.h \
include/HDU/hduQuaternion.h \
include/HDU/hduRecord.h \
include/HDU/hduVector.h \
src/HDU/src/hduAfx.h \
src/HDU/src/hduDecompose.h
FORMS += gui_telemanipulation.ui
#LIBS += -L"C:\\Folder\\Folder2\\LibFolder" -lextlib.lib
LIBS += -L"lib/" -lhd
LIBS += -L"lib/" -lhdu
With static libraries, you should be able to use simply this:
LIBS += "C:/Folder/Folder2/LibFolder/extlib.lib"
This is assuming you are doing Windows-only project. Read the docs for more.

Qt: pjsip linking problems

I am trying to write a softphone using qt. And many forums and resources, including stackoverflow, suggest to use pjsip libraries. So I decided to follow this advice and use it.
First, to be clear about my post here, my OS is linux (KUbuntu to be percise), and I am using Qt 5.4.1 and Qt Creator 3.3.2.
Also, I built pjsip static libraries using instructions on their website here: http://trac.pjsip.org/repos/wiki/Getting-Started/Autoconf.
And I have some troubles linking pjsip static libraries using qt. I've searched about this problem and didn't find the answer neither on this site nor anywhere. There are some topics on the forums but no one gives an answer to it.
Here is my qt .pro file:
TEMPLATE = app
QT += qml quick widgets
SOURCES += main.cpp
RESOURCES += qml.qrc
INCLUDEPATH += $$_PRO_FILE_PWD_/pjsip_headers
LIBS += -L$$_PRO_FILE_PWD_/pjsip_libs
linux-g++-64:LIBS += -lpjsua-x86_64-unknown-linux.gnu \
-lpjsip-ua-x86_64-unknown-linux.gnu\
-lpjsip-simple-x86_64-unknown-linux.gnu \
-lpjsip-x86_64-unknown-linux.gnu \
-lpjmedia-codec-x86_64-unknown-linux.gnu \
-lpjmedia-x86_64-unknown-linux.gnu \
-lpjmedia-codec-x86_64-unknown-linux.gnu \
-lpjmedia-audiodev-x86_64-unknown-linux.gnu \
-lpjmedia-videodev-x86_64-unknown-linux.gnu \
-lpjnath-x86_64-unknown-linux.gnu \
-lpjlib-util-x86_64-unknown-linux.gnu \
-lpj-x86_64-unknown-linux.gnu \
-lportaudio-x86_64-unknown-linux.gnu \
-lgsmcodec-x86_64-unknown-linux.gnu \
-lilbccodec-x86_64-unknown-linux.gnu \
-lspeex-x86_64-unknown-linux.gnu \
-lresample-x86_64-unknown-linux.gnu \
-lsrtp-x86_64-unknown-linux.gnu \
-lg7221codec-x86_64-unknown-linux.gnu \
-lopenh264 \
-lpjsua2-x86_64-unknown-linux.gnu
QML_IMPORT_PATH =
include(deployment.pri)
And here is the problem: when I try to build my project with this .pro file above, everything is OK until i try to use some function or an object of any class in this library. And if I do so, I get many undefined reference errors.
Pjsip manual says only about how to build your own application with this library by using GNU tools here: http://trac.pjsip.org/repos/wiki/Getting_Started_Using. But it involves editing Makefile, which is autogenerated by qmake in qt.
I just stuck with this problem and I don't know what else I can do about it. I read about linking order of this library while including it in your qt .pro file, but I tried many combinations and it didn't help.
Also, I read that it might be necessary to use QMAKE variables to set CFLAGS and LDFLAGS in qt .pro file according to pjsip instructions of how to build your own application using GNU tools.
And I even downloaded qt projects, which use pjsip libraries, for example, QjSimple, but I didn't find anything new in their qt .pro file settings.
Here is their qt .pro file:
DEFINES -= UNICODE
TEMPLATE = app
TARGET = QjSimple
QT += core \
gui \
xml \
network
HEADERS += buddy.h \
PjCallback.h \
accountdialog.h \
debugdialog.h \
addbuddydialog.h \
imwidget.h \
qjsimple.h
SOURCES += buddy.cpp \
PjCallback.cpp \
accountdialog.cpp \
debugdialog.cpp \
addbuddydialog.cpp \
imwidget.cpp \
main.cpp \
qjsimple.cpp
FORMS += accountdialog.ui \
debugdialog.ui \
addbuddydialog.ui \
imwidget.ui \
qjsimple.ui
RESOURCES += icons.qrc
win32-g++:RC_FILE = appicon.rc
INCLUDEPATH += ../pjproject-1.8.10/pjlib/include \
../pjproject-1.8.10/pjlib-util/include \
../pjproject-1.8.10/pjnath/include \
../pjproject-1.8.10/pjmedia/include \
../pjproject-1.8.10/pjsip/include
LIBS += -L../pjproject-1.8.10/pjlib/lib \
-L../pjproject-1.8.10/pjlib-util/lib \
-L../pjproject-1.8.10/pjnath/lib \
-L../pjproject-1.8.10/pjmedia/lib \
-L../pjproject-1.8.10/pjsip/lib \
-L../pjproject-1.8.10/third_party/lib
# INCLUDEPATH += ../pjproject-1.5.5/pjlib/include \
# ../pjproject-1.5.5/pjlib-util/include \
# ../pjproject-1.5.5/pjnath/include \
# ../pjproject-1.5.5/pjmedia/include \
# ../pjproject-1.5.5/pjsip/include
# LIBS += -L../pjproject-1.5.5/pjlib/lib \
# -L../pjproject-1.5.5/pjlib-util/lib \
# -L../pjproject-1.5.5/pjnath/lib \
# -L../pjproject-1.5.5/pjmedia/lib \
# -L../pjproject-1.5.5/pjsip/lib \
# -L../pjproject-1.5.5/third_party/lib
# INCLUDEPATH += ../pjproject-1.4/pjlib/include \
# ../pjproject-1.4/pjlib-util/include \
# ../pjproject-1.4/pjnath/include \
# ../pjproject-1.4/pjmedia/include \
# ../pjproject-1.4/pjsip/include
# LIBS += -L../pjproject-1.4/pjlib/lib \
# -L../pjproject-1.4/pjlib-util/lib \
# -L../pjproject-1.4/pjnath/lib \
# -L../pjproject-1.4/pjmedia/lib \
# -L../pjproject-1.4/pjsip/lib \
# -L../pjproject-1.4/third_party/lib
# win32-g++:LIBS += -L../openssl-0.9.8g
win32-g++:LIBS += -L../OpenSSL/lib/mingw
win32-g++:LIBS += -lpjsua-i686-pc-mingw32 \
-lpjsip-ua-i686-pc-mingw32 \
-lpjsip-simple-i686-pc-mingw32 \
-lpjsip-i686-pc-mingw32 \
-lpjmedia-codec-i686-pc-mingw32 \
-lpjmedia-i686-pc-mingw32 \
-lpjmedia-codec-i686-pc-mingw32 \
-lpjmedia-audiodev-i686-pc-mingw32 \
-lpjnath-i686-pc-mingw32 \
-lpjlib-util-i686-pc-mingw32 \
-lpj-i686-pc-mingw32 \
-lportaudio-i686-pc-mingw32 \
-lgsmcodec-i686-pc-mingw32 \
-lilbccodec-i686-pc-mingw32 \
-lspeex-i686-pc-mingw32 \
-lresample-i686-pc-mingw32 \
-lmilenage-i686-pc-mingw32 \
-lsrtp-i686-pc-mingw32 \
-lm \
-lwinmm \
-lole32 \
-lws2_32 \
-lwsock32 \
-lssl \
-lcrypto \
-lgdi32
linux-g++:LIBS += -lpjsua-i686-pc-linux-gnu \
-lpjsip-ua-i686-pc-linux-gnu \
-lpjsip-simple-i686-pc-linux-gnu \
-lpjsip-i686-pc-linux-gnu \
-lpjmedia-codec-i686-pc-linux-gnu \
-lpjmedia-i686-pc-linux-gnu \
-lpjmedia-codec-i686-pc-linux-gnu \
-lpjmedia-audiodev-i686-pc-linux-gnu \
-lpjnath-i686-pc-linux-gnu \
-lpjlib-util-i686-pc-linux-gnu \
-lpj-i686-pc-linux-gnu \
-lportaudio-i686-pc-linux-gnu \
-lgsmcodec-i686-pc-linux-gnu \
-lilbccodec-i686-pc-linux-gnu \
-lspeex-i686-pc-linux-gnu \
-lresample-i686-pc-linux-gnu \
-lmilenage-i686-pc-linux-gnu \
-lsrtp-i686-pc-linux-gnu \
-lm \
-lpthread \
-lssl \
-lasound \
-luuid
linux-g++-64:LIBS += -lpjsua-x86_64-unknown-linux-gnu \
-lpjsip-ua-x86_64-unknown-linux-gnu \
-lpjsip-simple-x86_64-unknown-linux-gnu \
-lpjsip-x86_64-unknown-linux-gnu \
-lpjmedia-codec-x86_64-unknown-linux-gnu \
-lpjmedia-x86_64-unknown-linux-gnu \
-lpjmedia-codec-x86_64-unknown-linux-gnu \
-lpjmedia-audiodev-x86_64-unknown-linux-gnu \
-lpjnath-x86_64-unknown-linux-gnu \
-lpjlib-util-x86_64-unknown-linux-gnu \
-lpj-x86_64-unknown-linux-gnu \
-lportaudio-x86_64-unknown-linux-gnu \
-lgsmcodec-x86_64-unknown-linux-gnu \
-lilbccodec-x86_64-unknown-linux-gnu \
-lspeex-x86_64-unknown-linux-gnu \
-lresample-x86_64-unknown-linux-gnu \
-lmilenage-x86_64-unknown-linux-gnu \
-lsrtp-x86_64-unknown-linux-gnu \
-lm \
-lpthread \
-lssl \
-lasound \
-luuid
macx-g++:LIBS += -lpjsua-i386-apple-darwin9.7.1 \
-lpjsip-ua-i386-apple-darwin9.7.1 \
-lpjsip-simple-i386-apple-darwin9.7.1 \
-lpjsip-i386-apple-darwin9.7.1 \
-lpjmedia-i386-apple-darwin9.7.1 \
-lpjmedia-i386-apple-darwin9.7.1 \
-lpjmedia-codec-i386-apple-darwin9.7.1 \
-lpjmedia-audiodev-i386-apple-darwin9.7.1 \
-lpjnath-i386-apple-darwin9.7.1 \
-lpjlib-util-i386-apple-darwin9.7.1 \
-lpj-i386-apple-darwin9.7.1 \
-lportaudio-i386-apple-darwin9.7.1 \
-lgsmcodec-i386-apple-darwin9.7.1 \
-lilbccodec-i386-apple-darwin9.7.1 \
-lspeex-i386-apple-darwin9.7.1 \
-lresample-i386-apple-darwin9.7.1 \
-lmilenage-i386-apple-darwin9.7.1 \
-lsrtp-i386-apple-darwin9.7.1 \
-lm \
-lpthread \
-lssl \
-lcrypto \
-framework \
CoreAudio \
-framework \
AudioToolbox \
-framework \
AudioUnit
OTHER_FILES += Changelog
There is nothing new in their .pro file.
So I just don't know where to find the solution. I hope I gave enough information. And as I mentioned above, I didn't find anyting useful about this problem.
Maybe there is another way to build a softphone by using qt, but as I found out pjsip library is one of the best decisions to do that. Any information would be appreciated.

qt c++ error: curl/curl.h: No such file or directory

I downloaded the libcURL source code and imported the headers and source into my .pro file and it seems to find all the libraries except for the main one.
dies on:
#include <curl/curl.h>
.pro file contains:
(this is the updated version)....................
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = RESTtest
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlMulti.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlHeader.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlVersion.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlEasy.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlShare.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlMessage.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlHttpPost.cpp \
HEADERS += mainwindow.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlEasy.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlInterface.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlMulti.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlPair.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlVersion.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlHttpPost.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlHeader.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlShare.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlMessage.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlError.h \
FORMS += mainwindow.ui
win32:LIBS += -L"../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64" -lcurl
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curlcpp/include"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curlcpp/src"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curl/include"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curl/include/curl"
OTHER_FILES += \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/curl.exe \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/libeay32.dll \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/libcurl.dll \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/ssleay32.dll \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/mk-ca-bundle.vbs
Install this:
apt-get install libcurl4-openssl-dev
apt-get install libcurl4-gnutls-devĀ 

Build protobufs only using Qt and tools shipped with it

I'm developing Qt application on Win 7 (using Windows Qt distro with MinGW included) and I need to use Google's protocol buffers. So I followed this How to build Google's protobuf in Windows using MinGW? and I have managed to build it.
But it was necessary for me to install separately MinGW and MSYS to achieve that.
Is there cleaner way how to built in protobufs in my app just using Qt and it's toolchain ?
We created new project and added files from protobuf. I can give you my .pro file.
Then we included this project to our common project (subdirs)
QT -= gui
TARGET = protobuf
TEMPLATE = lib
CONFIG += staticlib
# DESTDIR
win32 {
CONFIG(debug, debug|release): DESTDIR = ../bin/debug
CONFIG(release, debug|release): DESTDIR = ../bin/release
}
unix {
CONFIG(debug, debug|release): DESTDIR = ../bin_unix/debug
CONFIG(release, debug|release): DESTDIR = ../bin_unix/release
}
INCLUDEPATH += ../protobuf
SOURCES += \
google/protobuf/wire_format_lite.cc \
google/protobuf/wire_format.cc \
google/protobuf/unknown_field_set.cc \
google/protobuf/text_format.cc \
google/protobuf/service.cc \
google/protobuf/repeated_field.cc \
google/protobuf/reflection_ops.cc \
google/protobuf/message_lite.cc \
google/protobuf/message.cc \
google/protobuf/generated_message_util.cc \
google/protobuf/generated_message_reflection.cc \
google/protobuf/extension_set_heavy.cc \
google/protobuf/extension_set.cc \
google/protobuf/dynamic_message.cc \
google/protobuf/descriptor_database.cc \
google/protobuf/descriptor.pb.cc \
google/protobuf/descriptor.cc \
google/protobuf/compiler/parser.cc \
google/protobuf/compiler/importer.cc \
google/protobuf/io/zero_copy_stream_impl_lite.cc \
google/protobuf/io/zero_copy_stream_impl.cc \
google/protobuf/io/zero_copy_stream.cc \
google/protobuf/io/tokenizer.cc \
google/protobuf/io/printer.cc \
google/protobuf/io/gzip_stream.cc \
google/protobuf/io/coded_stream.cc \
google/protobuf/stubs/substitute.cc \
google/protobuf/stubs/strutil.cc \
google/protobuf/stubs/structurally_valid.cc \
google/protobuf/stubs/once.cc \
google/protobuf/stubs/common.cc
HEADERS += \
google/protobuf/wire_format_lite_inl.h \
google/protobuf/wire_format_lite.h \
google/protobuf/wire_format.h \
google/protobuf/unknown_field_set.h \
google/protobuf/text_format.h \
google/protobuf/service.h \
google/protobuf/repeated_field.h \
google/protobuf/reflection_ops.h \
google/protobuf/message_lite.h \
google/protobuf/message.h \
google/protobuf/generated_message_util.h \
google/protobuf/generated_message_reflection.h \
google/protobuf/extension_set.h \
google/protobuf/dynamic_message.h \
google/protobuf/descriptor_database.h \
google/protobuf/descriptor.pb.h \
google/protobuf/descriptor.h \
google/protobuf/compiler/parser.h \
google/protobuf/compiler/importer.h \
google/protobuf/io/zero_copy_stream_impl_lite.h \
google/protobuf/io/zero_copy_stream_impl.h \
google/protobuf/io/zero_copy_stream.h \
google/protobuf/io/tokenizer.h \
google/protobuf/io/printer.h \
google/protobuf/io/gzip_stream.h \
google/protobuf/io/coded_stream_inl.h \
google/protobuf/io/coded_stream.h \
google/protobuf/stubs/substitute.h \
google/protobuf/stubs/strutil.h \
google/protobuf/stubs/stl_util-inl.h \
google/protobuf/stubs/once.h \
google/protobuf/stubs/map-util.h \
google/protobuf/stubs/hash.h \
google/protobuf/stubs/common.h \
config.h
# Turn off ALL warning for the project
win32:CONFIG += warn_off
An alternative way to build is to use this project: https://github.com/cjh1/protobuf which does not require running ./configure but does require the CMake build system for Windows which can integrate with the MinGW toolchain that comes with Qt. It currently only builds a protobufs as static libraries (not dynamic/shared) and doesn't install header files but I hope eventually those features will be built in.