PDA

View Full Version : Qt



Unregistered
01-11-2002, 12:09 PM
I'm compiling a QT app the first 1 in the tutorial, I keep getting linker errors (different every time. QT was installed from RPM with my distro and all the include files are in usr/include/qt so the install should be OK.

the command Im typing is:
> g++ hiworld.cpp -o world

do I need to add anything to the command? some object files or something?

What else could be the problem?

PopRox
01-11-2002, 01:05 PM
There are almost certainly library files
that you have to link in on the compile command line. By default, only the standard C library is included. So, to include a specific extra library, the compile command needs -l (lowercase "L" not the digit) and a few letters to tell the name of the library. For example, -lm means include the math library. Check your docs for the reference to the library for QuickTime -- I bet it's -lqt or something like that. You may need other libraries too, such as -lm -lz. Check the QT docs.....

StarckTruth
01-18-2002, 05:48 AM
The way you know what the -l switches are is the name of the library minus "lib" at the beginning and the suffixes. F'r instance, the math library is libm.so.whatever so you use -lm; if you want libjpeg6a.so.blabla you would use the switch -ljpeg6a and so on.