QtCreator and external libraries
Hi,
I've developed a test application that makes use of psapi but when
I try to compile it, I obtain linking error like this
Quote:
prova2.cpp:66: undefined reference to `EnumProcesses@12'
So emerged the necessity to add libpsapi.a how can be done this in Qt Creator,
if i need to do this manually what I've to do?
Thanks,
Giuseppe Bonfa'
Re: QtCreator and external libraries
Open the .pro file and add LIBS += libpsapi.a and rerun qmake.
Re: QtCreator and external libraries
Thanks, solved by changing makefile in that way
Code:
LIBS = -L"c:\Qt\QtCreator\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4 [B]-lpsapi[/B]
now the problem is that i need to convert a TCHAR into QString
Code:
TCHAR szProcessName[4096] = {0};
//other code
but aaa comes out empty!
Re: QtCreator and external libraries
Re: QtCreator and external libraries
Solved in this way :)
Code:
#ifdef Q_OS_WIN
#ifdef UNICODE
aaa
= QString::fromUtf16((ushort
*)szProcessName
);
#else
aaa
= QString::fromLocal8Bit(szProcessName
);
#endif
#endif
Re: QtCreator and external libraries
how can i change the LIBS things in make file?
Re: QtCreator and external libraries
You can't. You should modify the .pro file.