Noah Pan - 2019-07-23

Hi All,

I am new to the forums and I was wondering if someone could help me out with the issues I am having.
I am trying to use the package, PythonQt here: https://mevislab.github.io/pythonqt/index.html
to embedded a python script into a C++ Qt front end.
I am having trouble building any of the examples sketches. I am running ubuntu 16.04 on vmware and I have QT 5 install and I am trying to use python2.7

I have tried two ways to compile:
cmd line, I run qmake && make
I run into an error that says:

g++ -c -m64 -pipe -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../src -I../../extensions/PythonQt_QtAll -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o main.o main.cpp
In file included from ../../src/PythonQt.h:46:0,
                 from main.cpp:42:
../../src/PythonQtUtils.h:48:22: fatal error: QByteArray: No such file or directory
compilation terminated.
Makefile:333: recipe for target 'main.o' failed
make: *** [main.o] Error 1

I also tried building through QtCreator, however the program lists these issues:

g++ -Wl,-rpath,/home/plloppii/Qt/5.13.0/gcc_64/lib -o ../../lib/PyLauncher_d main.o   -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -L../../lib/../lib -lPythonQt-Qt5-Python2.7_d -lPythonQt_QtAll-Qt5-Python2.7_d /home/plloppii/Qt/5.13.0/gcc_64/lib/libQt5Widgets.so /home/plloppii/Qt/5.13.0/gcc_64/lib/libQt5Gui.so /home/plloppii/Qt/5.13.0/gcc_64/lib/libQt5Core.so -lGL -lpthread   
/usr/bin/ld: cannot find -lPythonQt-Qt5-Python2.7_d
/usr/bin/ld: cannot find -lPythonQt_QtAll-Qt5-Python2.7_d
/usr/bin/ld: cannot find -lGL
Makefile:266: recipe for target '../../lib/PyLauncher_d' failed
collect2: error: ld returned 1 exit status
make: *** [../../lib/PyLauncher_d] Error 1
07:34:32: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project PyLauncher (kit: Desktop Qt 5.13.0 GCC 64bit)
When executing step "Make"
07:34:32: Elapsed time: 00:00.

If anyone could point me in the right direction, it would be greatly appriciated!!

Regards,
Noah