Results 1 to 2 of 2

Thread: Error after trying to run project in UBUNTU

  1. #1
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Error after trying to run project in UBUNTU

    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
    Qt Code:
    1. #include "mainwindow.h"
    2. #include <QtPlugin>
    3. #include <QApplication>
    4.  
    5. Q_IMPORT_PLUGIN(pnp_basictools)
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. /*Line 9---> */ Q_INIT_RESOURCE(resources);
    10. QApplication app(argc, argv);
    11. MainWindow window;
    12. window.show();
    13. return app.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 

    here's my qrc file
    Qt Code:
    1. <!DOCTYPE RCC><RCC version="1.0">
    2. <qresource prefix="/">
    3.  
    4. <file>images/IADFUQ.png</file>
    5. <file>images/add.png</file>
    6. <file>images/circle.png</file>
    7. <file>images/copy.png</file>
    8. <file>images/cut.png</file>
    9. <file>images/delete.png</file>
    10. <file>images/fitToView.png</file>
    11. <file>images/help.png</file>
    12. <file>images/new.png</file>
    13. <file>images/open.png</file>
    14. <file>images/parameter.png</file>
    15. <file>images/paste.png</file>
    16. <file>images/plugin.png</file>
    17. <file>images/print.png</file>
    18. <file>images/qt-logo.png</file>
    19. <file>images/redo.png</file>
    20. <file>images/save.png</file>
    21. <file>images/star.png</file>
    22. <file>images/storeTo.png</file>
    23. <file>images/trash.png</file>
    24. <file>images/undo.png</file>
    25. <file>images/viewer.png</file>
    26. <file>images/star.png</file>
    27. </qresource>
    28. </RCC>
    To copy to clipboard, switch view to plain text mode 

    All the images under this qrc exist in the my images folder.
    Last edited by sincnarf; 5th October 2007 at 04:35. Reason: wrong tags and debug message
    Image Analysis Development Framework Using Qt (IADFUQ)

  2. #2
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error after trying to run project in UBUNTU

    I've Commented line 9
    Qt Code:
    1. Q_INIT_RESOURCE(resources);
    To copy to clipboard, switch view to plain text mode 

    Now I get an error at the next line which is
    Qt Code:
    1. QApplication app(argc, argv);
    To copy to clipboard, switch view to plain text mode 

    (gdb) start
    Breakpoint 1 at 0x8050967: file main.cpp, line 10.
    Starting program: /home/sicnarf/Dokymentos/IADFUQ/SP/SP
    [Thread debugging using libthread_db enabled]
    [New Thread -1222580528 (LWP 6841)]
    [Switching to Thread -1222580528 (LWP 6841)]
    main (argc=1, argv=0xbfe2d624) at main.cpp:10
    10 QApplication app(argc, argv);
    (gdb) backtrace
    #0 main (argc=1, argv=0xbfe2d624) at main.cpp:10
    What is wrong with this? T_T
    Image Analysis Development Framework Using Qt (IADFUQ)

Similar Threads

  1. I need a project opinion.
    By hgedek in forum General Discussion
    Replies: 6
    Last Post: 25th September 2007, 18:54
  2. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 17:41
  3. how do i use a same project in multiple systems ?
    By nhatkhang in forum KDE Forum
    Replies: 6
    Last Post: 21st December 2006, 16:32
  4. Project generation on linux from QT Project
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 09:43
  5. Replies: 2
    Last Post: 11th July 2006, 14:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.