Shared library linkage problem
I have been writing a window tool for image sensor calibrations, it basically has these functions: a UI for interacting with users, a communication module responsible for communications between client and server, finally a module to represent the sensor's attributes and the necessary calibration methods.
I decided to implement it as a Qt custom widget plugin so it could be further integrated.
I created the custom widget project using Qt Creator which was sweet because it generated all the necessary files and project settings for me. Everything's swift until I began to add the communication and calibration functionalities to my widget class. My *_Questions_*: *Q1* when I build the window application linking this plugin, I got undefined reference linker error: "undefined reference to `sDeltaWidget::sDeltaWidget(QWidget*)'", seems linker cant find the widget class's constructor symbol, but using nm -C -D I could see that this symbol has been exported. My .pro file has been added into this line: LIBS +=/opt/Qt5.0.2/5.0.2/gcc/plugins/designer/libsdeltawidgetplugin.so, so ld should be able to find the library. Anyone knows why? Please help. *Q2* How do I input tab and new line in a post? The preview is ugly, please forgive me. *PS.* I know it's pretty messy and all the damn communists and dictators should all go to hell and got hit by thunder eaten by coyote drawn in the ocean fell down on the mountain bad dreams every night however it would be really appreciated if you could help.
I just found out what went wrong, in my .pri file,
@HEADERS += sdeltawidget.h
sDeltaCom/MetaPoint/MetaPoint.h \ (extra slash)
SOURCES += sdeltawidget.cpp
I put an extra slash in the end line of HEADERS which caused all my source files not being added. I think I'll go dig a hole and bury myself :-).