Results 1 to 2 of 2

Thread: qt 4.6.2 shared library using debug problem

  1. #1
    Join Date
    Apr 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default qt 4.6.2 shared library using debug problem

    Hi, I am new in qt. I have try use the simple shared library in test client. After compilations successes,try to debug the client ,but get error about debug helper. In qt examples the QTCreater can debug without problems.
    What i am doing not right,please?

    The library pro:
    QT -= gui

    TARGET = shareLib1
    TEMPLATE = lib
    DESTDIR = ../target/lib
    DEFINES += SHARELIB1_LIBRARY

    SOURCES += sharelib1.cpp

    HEADERS += sharelib1.h\
    shareLib1_global.h

    The Client pro:
    TARGET = cl1
    INCLUDEPATH += ../shareLib1
    DESTDIR += ../target/bin
    LIBS += -L../target/lib \
    -lshareLib1


    TEMPLATE = app


    SOURCES += main.cpp\
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui


    In the client the slot:

    int MainWindow::myslot1()
    {
    // ui->label->setText("4566");
    ShareLib1 *lib = new ShareLib1();
    QString str = lib->hello();
    ui->label->setText(str);
    return 0;
    }

    If uncomment first line and comment the lib lines,all is working.

    Thanks.Sonia
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt 4.6.2 shared library using debug problem

    I put all outputs .exe and .dll to the same bin dir (DESTDIR += ../bin) and now it is working

Similar Threads

  1. Application with shared library problem in linux
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2010, 07:20
  2. Problem with NCReport : can't link shared library !
    By QAmazigh in forum Qt Programming
    Replies: 4
    Last Post: 5th June 2009, 23:38
  3. so shared library problem
    By mtrpoland in forum Newbie
    Replies: 3
    Last Post: 13th August 2007, 21:51
  4. mac qmake .obj/debug-shared
    By denis.bz in forum Newbie
    Replies: 4
    Last Post: 2nd July 2007, 17:42
  5. shared library problem
    By nhatkhang in forum KDE Forum
    Replies: 9
    Last Post: 28th November 2006, 04:07

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.