Results 1 to 4 of 4

Thread: LNK2019 with QString::free in VS2010

  1. #1
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question LNK2019 with QString::free in VS2010

    Hi evivary,

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


    QString
    Qt Code:
    1. #include <QtGui>
    2. #include <QtCore>
    3.  
    4. . . .
    5. . . .
    6. . . .
    7.  
    8. void EditWindow::setFilename(const QString &filename)
    9. {
    10. myFilename = Utils::normalizeFilename(filename);
    11.  
    12. QFileInfo fi(myFilename);
    13. if (myFilename.isEmpty())
    14. myName = tr("Untitled");
    15. else
    16. myName = fi.fileName();
    17. }
    To copy to clipboard, switch view to plain text mode 

    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 ...

    Qt 4.8
    VS2010
    Last edited by ilermar; 17th February 2012 at 21:37.

  2. #2
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: LNK2019 with QString::free in VS2010

    Well this link error ... is just when use release mode. If i use debug mode is working fine.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: LNK2019 with QString::free in VS2010

    Clean your project, i.e. remove all the intermediate files, and rebuild. Does the problem persist?

  4. #4
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: LNK2019 with QString::free in VS2010

    Quote Originally Posted by ChrisW67 View Post
    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.

Similar Threads

  1. Replies: 5
    Last Post: 9th June 2011, 11:22
  2. Help - LNK2019: Unresolved external symbol
    By marc2050 in forum Newbie
    Replies: 3
    Last Post: 17th May 2011, 01:29
  3. Replies: 3
    Last Post: 29th April 2011, 09:13
  4. QVariant with QString / who free's its data?
    By elias.bachaalany in forum Newbie
    Replies: 1
    Last Post: 26th October 2010, 10:42
  5. What to free or not to free, that is the question
    By bruccutler in forum Qt Programming
    Replies: 1
    Last Post: 25th July 2007, 05:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.