Hi,
I created a custom widget in designer and I'm now ready to use the widget in my other projects but I'm getting either compile issues or the program compiles but doesn't run due to the custom widget library.
I first used the custom widget without changing the .pro file and got the following error ;
|
Source code
|
1
2
3
4
5
6
7
|
>make
/usr/bin/qmake -unix -o Makefile currency.pro
g++ -o currency currency.o currxml.o main.o moc_currency.o -L/usr/lib -lQtXml -L/usr/lib -pthread -pthread -lQtGui -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtNetwork -pthread -pthread -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
currency.o: In function `Ui_Dialog::setupUi(QDialog*)':
currency.cpp:(.text._ZN9Ui_Dialog7setupUiEP7QDialog[Ui_Dialog::setupUi(QDialog*)]+0x750): undefined reference to `SelectDateWidget::SelectDateWidget(QWidget*)'
collect2: ld returned 1 exit status
make: *** [currency] Error 1
|
I then changed the .pro file and added :
|
Source code
|
1
|
LIBS += -L/usr/lib/qt4/plugins/designer -lselectdatewidget
|
Now the compile goes ok but when I run the program I get the following message
|
Source code
|
1
2
|
>./currency
./currency: error while loading shared libraries: libselectdatewidget.so: cannot open shared object file: No such file or directory
|
What do I need to change to use my new custom widget?
I'm running Qt4.3 on a linux box.
Regards,
Leo Paalvast
This post has been edited 1 times, last edit by "leoclog" (Apr 13th 2008, 8:17pm)