I started my project using windows and it compiles and runs without errors.
I am currently trying to run my project under ubuntu feisty fawn. There seem to be an error when I am trying to run my prject. on executing my project, my mainwindow does not show at all and I get an error (Segmentation fault (core dumped)) error. I used gdb for debugging and here's what I get.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) start
Breakpoint 1 at 0x8050f65: file main.cpp, line 9.
Starting program: /home/sicnarf/Dokymentos/IADFUQ/SP/SP
[Thread debugging using libthread_db enabled]
[New Thread -1222629680 (LWP 7316)]
[Switching to Thread -1222629680 (LWP 7316)]
main (argc=1, argv=0xbfce54d4) at main.cpp:9
9 Q_INIT_RESOURCE(resources);
Whenever I try to rebuild my project I use the ff. procedure
make clean
qmake -config debug
make
Line 9 is defined here
#include "mainwindow.h"
#include <QtPlugin>
#include <QApplication>
Q_IMPORT_PLUGIN(pnp_basictools)
int main(int argc, char *argv[])
{
/*Line 9---> */ Q_INIT_RESOURCE(resources);
MainWindow window;
window.show();
return app.exec();
}
#include "mainwindow.h"
#include <QtPlugin>
#include <QApplication>
Q_IMPORT_PLUGIN(pnp_basictools)
int main(int argc, char *argv[])
{
/*Line 9---> */ Q_INIT_RESOURCE(resources);
QApplication app(argc, argv);
MainWindow window;
window.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
here's my qrc file
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>images/IADFUQ.png</file>
<file>images/add.png</file>
<file>images/circle.png</file>
<file>images/copy.png</file>
<file>images/cut.png</file>
<file>images/delete.png</file>
<file>images/fitToView.png</file>
<file>images/help.png</file>
<file>images/new.png</file>
<file>images/open.png</file>
<file>images/parameter.png</file>
<file>images/paste.png</file>
<file>images/plugin.png</file>
<file>images/print.png</file>
<file>images/qt-logo.png</file>
<file>images/redo.png</file>
<file>images/save.png</file>
<file>images/star.png</file>
<file>images/storeTo.png</file>
<file>images/trash.png</file>
<file>images/undo.png</file>
<file>images/viewer.png</file>
<file>images/star.png</file>
</qresource>
</RCC>
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>images/IADFUQ.png</file>
<file>images/add.png</file>
<file>images/circle.png</file>
<file>images/copy.png</file>
<file>images/cut.png</file>
<file>images/delete.png</file>
<file>images/fitToView.png</file>
<file>images/help.png</file>
<file>images/new.png</file>
<file>images/open.png</file>
<file>images/parameter.png</file>
<file>images/paste.png</file>
<file>images/plugin.png</file>
<file>images/print.png</file>
<file>images/qt-logo.png</file>
<file>images/redo.png</file>
<file>images/save.png</file>
<file>images/star.png</file>
<file>images/storeTo.png</file>
<file>images/trash.png</file>
<file>images/undo.png</file>
<file>images/viewer.png</file>
<file>images/star.png</file>
</qresource>
</RCC>
To copy to clipboard, switch view to plain text mode
All the images under this qrc exist in the my images folder.
Bookmarks