J Leslie Turriff via tde-users wrote:
I'm trying to get a handle on writing an app for
Trinity, starting with stuff
from the Wiki; but it's a struggle.
I Followed
Support =>
Wiki =>
Developers =>
Tutorials and Documentation for QT and TQT
and hiding under the QT3 API Documentation link (which really points to
TQt Reference Documentation (Open Source Edition)
I found the Getting Started section. Following How To Learn TQt showed me C++
GUI Programming with TQt 3 (which I have ordered); many of the other links on
this page point to a now-deceased TrollTech website. :-(
I moved on to Tutorial #1, and after figuring out that references to "qmake"
should really be to "tqmake", I tried compiling the fourteen example
programs.
They all fail with the same error. Example #1 is typical:
| $ make
|
g++ -c -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -pipe -fvisibility=hidden
-fvisibility-inlines-hidden -Wall -W -O2 -DQT_NO_DEBUG -I/usr/share/tqt3/mkspecs/default
-I. -I. -I/usr/include -I/usr/include/tqt3 -o
main.o main.cpp
| g++ -luuid -o hello
main.o -L/usr/lib64 -L/usr/lib64 -L/usr/X11R6/lib64 -luuid -ltqt -lXext -lX11 -lm
| /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
main.o: undefined reference to
symbol '_ZN13TQApplication13setMainWidgetEP8TQWidget'
| /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/libtqt-mt.so.3:
error adding symbols: DSO missing from command line
| collect2: error: ld returned 1 exit status
| make: *** [Makefile:88: hello] Error 1
in which the loader seems to be complaining about setMainWidget, a method of
TQApplication. It seems to be expecting to find it in
| /usr/lib64/libtqt-mt.so.3
and I see on the web that adding
| -ltqt-mt
will fix the problem, and several web responses say to use
| ./configure LIBS=-ltqt-mt
but how would I do that with tqmake?
Leslie
____________________________________________________
tde-users mailing list -- users(a)trinitydesktop.org
To unsubscribe send an email to users-leave(a)trinitydesktop.org
Web mail archive available at
https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@trinitydeskt…
I just tried the t1 example in the tutorial folder from the tqt3 source
in the console:
g++ main.cpp -I/usr/include/tqt -I/usr/include/tqt3 -ltqt-mt -o t1
./t1
(my) corresponding t1.pro file:
TEMPLATE = app
CONFIG += qt warn_on release
HEADERS =
SOURCES = main.cpp
TARGET = t1
INCLUDEPATH = /usr/include/tqt3 /usr/include/tqt
tqmake -o Makefile t1.pro
make
./t1
regarding the book i like "Programming with Qt" 2nd edition (the second
edition includes qt3) from O'Reilly by Matthias Kalle Dalheimer
Cheers.