Page 1 of 1

Qt SerialPort for qlcplus_4.10.2b.tar.gz and qt-opensource-mac-4.8.6-1.dmg on Mac 10.10.5

Posted: Wed Feb 24, 2016 10:50 pm
by blekenbleu
## My first Qt experience..
## How to implement 64-bit Qt 4 Serial Port support?

## Following instructions at
https://github.com/mcallegari/qlcplus/w ... uild-HOWTO
qmake -spec macx-g++
make
##-> failed for
./qtserial-interface.h:23:10: fatal error: 'QtSerialPort/QSerialPort' file not found

## Based on https://wiki.qt.io/Qt_Serial_Port
git clone git://code.qt.io/qt/qtserialport.git
cd qtserialport/
git checkout qt4-dev
cd ..
mkdir qtserialport-build
cd qtserialport-build/
qmake -spec macx-g++ ../qtserialport/qtserialport.pro
make
sudo make install

## Now fails at plugin link step

cd ../qlcplus-4.10.2
git diff qlc.pro

diff --git a/qlc.pro b/qlc.pro
index ef49ecf..f16466b 100644
--- a/qlc.pro
+++ b/qlc.pro
@@ -5,6 +5,8 @@ TEMPLATE = subdirs
android: CONFIG += qmlui
ios: CONFIG += qmlui

+CONFIG += serialport
+
SUBDIRS += hotplugmonitor
SUBDIRS += engine


qmake -spec macx-g++
make
...
...
rm -f libdmxusb.dylib
g++ -headerpad_max_install_names -arch x86_64 -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.5 -o libdmxusb.dylib qlcioplugin.o dmxinterface.o dmxusb.o dmxusbwidget.o dmxusbconfig.o enttecdmxusbpro.o enttecdmxusbopen.o stageprofi.o vinceusbdmx512.o midiprotocol.o nanodmx.o euroliteusbdmxpro.o qtserial-interface.o libftdi-interface.o moc_qlcioplugin.o moc_dmxusb.o moc_dmxusbconfig.o moc_enttecdmxusbpro.o moc_enttecdmxusbopen.o -F/Library/Frameworks -L/Library/Frameworks -L/opt/local/lib -lftdi -lusb -framework QtGui -framework QtCore
Undefined symbols for architecture x86_64:
"QSerialPort::setBaudRate(int, QFlags<QSerialPort::Direction>)", referenced from:
QtSerialInterface::readLabel(unsigned char, int*) in qtserial-interface.o
QtSerialInterface::setBaudRate() in qtserial-interface.o
"QSerialPort::.."
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libdmxusb.dylib] Error 1
make[2]: *** [sub-src-make_default-ordered] Error 2
make[1]: *** [sub-dmxusb-make_default] Error 2
make: *** [sub-plugins-make_default-ordered] Error 2

ls -lt /Library/Frameworks/ | head -26
total 560
-rwxr-xr-x@ 1 root wheel 252220 Feb 24 15:15 libQtSerialPort_debug.1.0.0.dylib
lrwxr-xr-x 1 root wheel 33 Feb 24 15:15 libQtSerialPort_debug.1.0.dylib -> libQtSerialPort_debug.1.0.0.dylib
lrwxr-xr-x 1 root wheel 33 Feb 24 15:15 libQtSerialPort_debug.1.dylib -> libQtSerialPort_debug.1.0.0.dylib
lrwxr-xr-x 1 root wheel 33 Feb 24 15:15 libQtSerialPort_debug.dylib -> libQtSerialPort_debug.1.0.0.dylib
-rw-r--r--@ 1 root wheel 531 Feb 24 15:15 libQtSerialPort_debug.prl
drwxrwxr-x 7 root admin 238 Feb 24 13:59 Qt3Support.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtCore.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtDBus.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtDeclarative.framework
drwxrwxr-x 8 root admin 272 Feb 24 13:59 QtGui.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtMultimedia.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtNetwork.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtOpenGL.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtScript.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtScriptTools.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtSql.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtSvg.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtWebKit.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtXml.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtXmlPatterns.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 phonon.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtDesigner.framework
drwxrwxr-x 6 root admin 204 Feb 24 13:59 QtDesignerComponents.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtHelp.framework
drwxrwxr-x 7 root admin 238 Feb 24 13:59 QtTest.framework

Re: Qt SerialPort for qlcplus_4.10.2b.tar.gz and qt-opensource-mac-4.8.6-1.dmg on Mac 10.10.5

Posted: Thu Feb 25, 2016 7:23 pm
by mcallegari
What is this ??
And moreover, why would you want to use Qt 4 on a recent OSX version ? That's most likely not supported.

You need to follow the Qt 5 build howto: https://github.com/mcallegari/qlcplus/w ... -build-Qt5

Re: Qt SerialPort for qlcplus_4.10.2b.tar.gz and qt-opensource-mac-4.8.6-1.dmg on Mac 10.10.5

Posted: Thu Feb 25, 2016 9:04 pm
by blekenbleu
Sorry, I mistakenly thought qlcplus 4.10.2b still used Qt 4.