Results 1 to 3 of 3

Thread: Hello Everyone

  1. #1
    Join Date
    May 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Hello Everyone

    Hi All,
    I am a novice to QT Framework, although worked on C++ for a long time.
    I am trying to use QT Framework for creating a Dynamic Link Library in QT using VS 2005.
    I could create and export function from the library which take primitive types like "int" and could call these functions from QT Windows Application.
    But , I need to be able to pass and return QT objects like QString to and from functions exported from the DLL on Windows.

    When I try to pass QString and return QString it gives me the following

    Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString@@QAE@XZ) referenced in function _ShowMessage ssaqtlib.obj
    Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString@@QAE@ABV0@@Z) referenced in function _ShowMessage ssaqtlib.obj
    Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString@@QAE@XZ) referenced in function _ShowMessage ssaqtlib.obj

    Exported function is as under

    extern "C" SSAQTLIB_EXPORT QString ShowMessage();

    Can you please help me on this ?

    Thanking in advance.

    SSA
    Last edited by jpn; 12th May 2008 at 13:35. Reason: missing [quote] tags

  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: Hello Everyone

    You forgot to link against Qt libraries (here: QtCore).

  3. #3
    Join Date
    May 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Hello Everyone

    Hi ChristianEhrlicher,

    Thank you very much, Its such a silly thing that I missed out.

    None the less you guidance helped .

    Regards
    SSA.

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.