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
Bookmarks