OK, I tried some stuff and this is what I've got (mostly to clean up ideas, as
I may have confused lots of you ;) )
I've made a config.pri that looks like this:
QEXTSERIALPORT_LIBRARY = yes
QEXTSERIALPORT_WITH_UDEV = yes
If I later issue qmake ; make, everything goes fine.
Now, I want to pass "-fvisibility=hidden -fvisibility-inlines-hidden" because
of [0]. This greatly reduces maintainership time filtering unwanted symbols.
So I now issue:
$ make distclean
$ qmake QMAKE_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
$ make
and I get:
/usr/bin/moc-qt4 -DQEXTSERIALPORT_USING_SHARED -D__linux__ -DQT_NO_DEBUG -
DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -
I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -
I../../src -I. QespTest.h -o moc_QespTest.cpp
g++ -c -fvisibility=hidden -fvisibility-inlines-hidden -O2 -Wall -W -
D_REENTRANT -DQEXTSERIALPORT_USING_SHARED -D__linux__ -DQT_NO_DEBUG -
DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -
I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -
I../../src -I. -o moc_QespTest.o moc_QespTest.cpp
g++ -m64 -Wl,-O1 -Wl,-
rpath,/home/lisandro/damian/debian/propios/qextserialport/git/lib -o qespta
main.o MainWindow.o MessageWindow.o QespTest.o moc_MainWindow.o
moc_MessageWindow.o moc_QespTest.o -L/usr/lib/x86_64-linux-gnu -
L/home/lisandro/damian/debian/propios/qextserialport/git/lib -
lqextserialport-1.2 -ludev -lQtGui -lQtCore -lpthread
QespTest.o: In function `QespTest::QespTest(QWidget*)':
QespTest.cpp:(.text+0x63): undefined reference to
`QextSerialPort::QextSerialPort(QString const&, QextSerialPort::QueryMode,
QObject*)'
QespTest.cpp:(.text+0x88): undefined reference to
`QextSerialPort::setBaudRate(BaudRateType)'
QespTest.cpp:(.text+0x93): undefined reference to
`QextSerialPort::setFlowControl(FlowType)'
QespTest.cpp:(.text+0x9e): undefined reference to
`QextSerialPort::setParity(ParityType)'
QespTest.cpp:(.text+0xac): undefined reference to
`QextSerialPort::setDataBits(DataBitsType)'
QespTest.cpp:(.text+0xba): undefined reference to
`QextSerialPort::setStopBits(StopBitsType)'
QespTest.cpp:(.text+0xc8): undefined reference to
`QextSerialPort::setTimeout(long)'
collect2: error: ld returned 1 exit status
make[2]: *** [qespta] Error 1
make[2]: Leaving directory
`/home/lisandro/damian/debian/propios/qextserialport/git/examples/qespta'
make[1]: *** [sub-qespta-make_default] Error 2
make[1]: Leaving directory
`/home/lisandro/damian/debian/propios/qextserialport/git/examples'
make: *** [sub-examples-make_default-ordered] Error 2
So clearly (at least) those symbols are getting lost. So far I'm totally lost
as to why :-/
Any ideas?
Kinds regards, Lisandro.
[0] <
http://gcc.gnu.org/wiki/Visibility>
--
"Los promotores del software privativo demonizan algo tan básico y ético como
el hecho de compartir imponiendo términos como el de 'pirata'. Equiparan
ayudar al prójimo con atacar barcos. Cuando me preguntan qué pienso de la
piratería musical e informática digo que atacar barcos es muy malo y,
que yo sepa, los piratas no usan computadoras.”
Richard Stallman, 05/11/2008, anexo de la Cámara de Diputados, Argentina