Qt – Adding External Libs to your Project

Hi,

During Qt Development with Qt Creator, emerged the necessity to add more libraries to my project, at the actual state of art Qt Creator does not provides an automated/graphical system to add libraries and since is using GCC is not possible to use #pragma comment(), so we have to modify by hand some files, here how to.

Suppose that you need to add psapi library, first of all locate into project directory Makefile.Debug and Makefile.Release

Open one of the two files (depends on how you need to deploy you program) and locate

LIBS        =        -L”c:\Qt\QtCreator\qt\lib” -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4

now you can easly add your lib

LIBS        =        -L”c:\Qt\QtCreator\qt\lib” -lmingw32 -lqtmaind -lQtGuid4 -lpsapi -lQtCored4

See you to the next post..🙂

4 Responses to Qt – Adding External Libs to your Project

  1. Mike says:

    Just passing by.Btw, you website have great content!

    _________________________________
    Making Money $150 An Hour

  2. ffwill says:

    merci pour l’idée!
    En cherchant un peu plus, j’ai remarqué que en éditant en éditant le fichier .pro

    LIBS += -lpsapi

    les makefiles seront alors automatiquement généré

  3. ffwill says:

    oups sorry! this blog is in English…, So:
    Thanks for the idea,
    I find another way to to this by adding
    LIBS += lpsapi
    in .pro file
    new makefile will be automatically generated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: