hello everyone
i am using Qt4.4.0 on Ubuntu Hardy.
i want to make some report to print from my application so i get the NCReport (NCReport_2.1.1_Linux_bin_Qt4.4.1.tar.gz) from http://nocisoft.com/?id=down&lang=en .
i made a small report with NCReportDesigner & everything is good !
but when i try to run it from my application i get the error :
error while loading shared libraries: libncreport.so.2: cannot open shared object file: No such file or directory
i followed the documentation so in my .pro i added :
INCLUDEPATH = NCReport2/include
win32 {
LIBS += NCReport2/lib/ncreport2.lib
}
unix {
LIBS += -lncreport -L NCReport2/lib -L/usr/local/bin
target.path = /usr/local/bin
}
include contains the header files
and lib contains libraries
in lib folder i have :
libncreportdesigner.so -> libncreportdesigner.so.2.1.1
libncreportdesigner.so.2 -> libncreportdesigner.so.2.1.1
libncreportdesigner.so.2.1 -> libncreportdesigner.so.2.1.1
libncreportdesigner.so.2.1.1
libncreport.so -> libncreport.so.2.1.1
libncreport.so.2 -> libncreport.so.2.1.1
libncreport.so.2.1 -> libncreport.so.2.1.1
libncreport.so.2.1.1
i tried to change the name libncreport.so.2.1.1 to libncreport.so.2 as the error say and i put it in /usr/lib , the error disappear but the report doesn't run , so i think changing name was not a good idea
code genarating report :
Qt Code:
NCReport *report = new NCReport(); report->reset(); report->setReportFile("reports/report1.xml"); // report file report->addItemModel(model,"model1"); report->runReportToPrinter();To copy to clipboard, switch view to plain text mode
anyone can help please ??
or if anyone has NCReport sources(.cpp) , so we don't need libraries ...
thanks
Bookmarks