Results 1 to 2 of 2

Thread: "Treat wchar_t as Built-in Type" to "yes" link error

  1. #1
    Join Date
    Feb 2006
    Posts
    4
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default "Treat wchar_t as Built-in Type" to "yes" link error

    I am a new Qt user. I am having a issue on a project When using QString::fromWCharArray.my Qt version is 4.4.0
    vs2005 gives the following link error:
    error LNK2019: unresolved external symbol "__declspec(dllimport)
    public: static class QString __cdecl QString::fromWCharArray(wchar_t const *,int)"
    (__imp_?fromWCharArray@QString@@SA?AV1@PB_WH@Z) referenced in function "public:
    void __thiscall midiIO::queryMidiInDevices(void)" (?queryMidiInDevices@midiIO@@QAEXXZ)

    i see the topic http://www.qtcentre.org/forum/f-qt-p...2005-4625.html

    I am linking into my Qt VS2005 project that have the compiled with "Treat wchar_t as Built-in Type" set to "Yes". my Third party libraries (FDO http://fdo.osgeo.org) need to built this way.

    my Qt VS2005 project build fine with qt version 3.3.1,but use qt 4.4.0 have this issues.

    How do I use Qt's QString::fromWCharArray(4.4.0) with libaries built with "Yes" for "Treat wchar_t as Built-in Type"?

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "Treat wchar_t as Built-in Type" to "yes" link error

    You have to compile your project and qt with this option too.
    For Qt you have to modify QMAKE_CFLAGS in qt4/mkspecs/msvc2005/qmake.conf and then recompile your complete Qt

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 15:22
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 14:43
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 13:57
  4. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 03:49
  5. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 13:19

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.