Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

about compiling in Debian Linux

Status
Not open for further replies.

rushtosri

Programmer
Feb 25, 2001
80
US
Hi,

I am running Debian Linux

could somebody please tell me how to compile the qt "hello world" program in the tutorial?

I am obviously missing something simple but I can't get g++ to find the library!!

Shri.
 
Hi,



Try putting the explicit path to the lib directory (and header files if needed) e.g. :



g++ hello.c -o hello.o -I/usr/lib/qt-1.45/include -L/usr/lib/qt-1.45/lib -lqt



or



g++ hello.c -o hello.o -I/usr/lib/qt-2.3.1/include -L/usr/lib/qt-2.3.1/lib -lqt



(depending on version of headers/modules you have)



-I is path the include headers (.h files)

-L is path to qt libs

-l is name of library containg code needed without the 'lib' - e.g. libqt = qt.



Your paths may differ but you get the idea no doubt. You can also set the QTDIR environment variable like :



setenv QTDIR /opt/qt-2.3.1 (whatever is appropriate for debian)


See also --> .



Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top