Tuesday, September 7, 2010

Qt-Creator: Using native/platform specific library

Unfortunately, Qt-Creator so far does not provide for addition of native/platform specific dependencies from its UI. The only way to do it is by editing the .pro file manually.

An example:

If the Win32 API GetKeyState() contained in User32.dll is used in your code, append the following lines to the .pro file of your project:

win32 {

LIBS += User32.lib

}

Simlarly, an Unix specific dependency will go into a block like this&

unix{

LIBS += -L/usr/local/lib -lmath

}

No comments:

Post a Comment