[Qt-interest] GL_lib for LINUX

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Mon Nov 16 07:29:04 CET 2009


Sujan Dasmahapatra wrote on Monday, November 16, 2009 4:36 AM:

> ...
> into my Qt application now to use GLC_libs apis what should I include
> in my profile.   

Just as any other library you would use, with the -l linker switch:

in your *.pro
LIBS += -lTheNameOfTheLibrary

That works if the library is installed in a "well-known" (speak: in the LD_LIBRARY_PATH) place, e.g. /usr/lib. But you can also specify the location like this:

LIBS += -L/path/to/your/lib -lTheNameOfTheLibrary

Note: when the library is called libGLC.so for example, then 'TheNameOfTheLibrary' would be -lGLC (without "lib" and suffix .so).

In case GLC library also provides a so-called "package configuration" (and such a configuration mechanism is present on your given Linux distribution), then you could simply use

  CONFIG += link_pkgconfig
  PKGCONFIG += TheNameOfTheLibrary

Also refer to http://doc.trolltech.com/4.5/qmake-project-files.html#declaring-other-libraries (which you should have done in the first place before asking questions here).

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list