Results 1 to 3 of 3

Thread: WCHAR to QString giving error in vs2005

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ucomesdag Guest

    Post WCHAR to QString giving error in vs2005

    When using QString::fromWCharArray(const wchar_t* , int size = - 1);

    vs2005 gives the following error:
    Qt Code:
    1. error LNK2019: unresolved external symbol "__declspec(dllimport)
    2. public: static class QString __cdecl QString::fromWCharArray(wchar_t const *,int)"
    3. (__imp_?fromWCharArray@QString@@SA?AV1@PB_WH@Z) referenced in function "public:
    4. void __thiscall midiIO::queryMidiInDevices(void)" (?queryMidiInDevices@midiIO@@QAEXXZ)
    To copy to clipboard, switch view to plain text mode 

    To fix this, go to Project --> Properties --> Configuration Properties -->
    C/C++ --> Language, and set 'Treat wchar_t as Built-in Type' to No.

    Hope it helps someone, it fixed my day...

  2. The following 9 users say thank you to ucomesdag for this useful post:

    desch (16th November 2009), DIMEDROLL (12th December 2010), khaake (7th March 2007), McKee (11th May 2007), mclark (10th July 2008), negritot (30th September 2010), skuda (30th September 2010), soniaerm (29th April 2010), sunil.thaha (27th November 2006)

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.