PDA

View Full Version : LNK2019 with QString::free in VS2010



ilermar
17th February 2012, 18:48
Hi evivary,

I just start with Qt and i´m having this errors: :confused:


QString



#include <QtGui>
#include <QtCore>

. . .
. . .
. . .

void EditWindow::setFilename(const QString &filename)
{
myFilename = Utils::normalizeFilename(filename);

QFileInfo fi(myFilename);
if (myFilename.isEmpty())
myName = tr("Untitled");
else
myName = fi.fileName();
}


and here is the error


Error 3 error LNK2019: sÃ*mbolo externo "__declspec(dllimport) protected: static void __cdecl QString::free(struct QString:: Data *)" (__imp_?free@QString@@KAXPAUData@1@@Z) sin resolver al que se hace referencia en la función "public: void __thiscall EditWindow:: setFilename(class QString const &)" (?setFilename@EditWindow@@QAEXABVQString@@@Z) C:\...\editwindow.obj SEditorV0


this happens when i want to generate a release solution
i'll been looking at the forum but i can't find some post who give me some help ... if somebody have an idea i really appreciate ... :confused:

Qt 4.8
VS2010

ilermar
17th February 2012, 22:13
Well this link error ... is just when use release mode. If i use debug mode is working fine.

ChrisW67
18th February 2012, 23:40
Clean your project, i.e. remove all the intermediate files, and rebuild. Does the problem persist?

ilermar
14th March 2012, 20:42
Clean your project, i.e. remove all the intermediate files, and rebuild. Does the problem persist?

thanks ChrisW67, this problem is solved. I remove all the files and now i can build my project.