Results 1 to 20 of 24

Thread: very strange behaviour

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: very strange behaviour

    Try cleaning your build and rebuilding the application from scratch (make distclean && qmake && make).

  2. #2
    Join Date
    Jan 2006
    Posts
    45
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: very strange behaviour

    I have made a new project with kdevelop on a fresh suse 10.0 installation. I imported only the sourcefiles, headers and ui files. I added the config macros and the libs and includes in the pro file, I ran qmake and it issued warnings about possible symbol conflicts in a lot of sourcefiles. I tried to build the project: no luck. I tried to build the subproject (what is the difference between a project and subproject??) and it compiled all the sourcefiles but failed to link the application properly

    On the computer where the app is still compiling I ran make distclean in the src directory
    It replied no rule to make or something like that probably because I removed all the .o files as well as the moc* files as well as the Makefile. So I ran qmake and in kdev I chose for build project and it compiled and linked fine. When I chose start debug, the application started but jumped over the breakpoint I had put in a constructor that is executed.

    ????
    Rgx

  3. #3
    Join Date
    May 2006
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    8
    Thanked 3 Times in 2 Posts

    Default Re: very strange behaviour

    perhaps you could try compiling with the -g and -O0, so no optimisations.
    This would help when debugging, the lines dont jump around seemingly random.

    And then put a watch for the variable so the debugger stops at it, or when it changes.

  4. #4
    Join Date
    Jan 2006
    Posts
    45
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: very strange behaviour

    no effect after compiling with O0

    Rgx

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: very strange behaviour

    Quote Originally Posted by regix
    I have made a new project with kdevelop on a fresh suse 10.0 installation. I imported only the sourcefiles, headers and ui files. I added the config macros and the libs and includes in the pro file, I ran qmake and it issued warnings about possible symbol conflicts in a lot of sourcefiles. I tried to build the project: no luck. I tried to build the subproject (what is the difference between a project and subproject??) and it compiled all the sourcefiles but failed to link the application properly
    Did you clean all the temporary files (especially ones that moc created) before moving them to the new project?

  6. #6
    Join Date
    Jan 2006
    Posts
    45
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: very strange behaviour

    I went into the src directory and did
    rm *.o
    rm moc*
    rm Makefile

    Are there any more files I should delete?

    Rgx

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: very strange behaviour

    Try running 'make clean' or even 'make distclean'.

  8. #8
    Join Date
    Jan 2006
    Posts
    45
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: very strange behaviour

    These are the flags that are set in the makefile for compiling

    CFLAGS = -pipe -O0 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -W -g -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
    CXXFLAGS = -pipe -O0 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -W -g -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT

    Rgx

  9. #9
    Join Date
    Jan 2006
    Posts
    45
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Wink Re: very strange behaviour

    Hi,

    The solution of the problem was found by a friend of mine who suggested that kdevelop didn't search for the executable in de src directory and that I would probably find the actual executable in this src directory. And indeed there was the executable I was expecting...
    Hope this helps other people with similar problems.
    Does anybody know what I should change in the .pro or Makefile so that kdevelop runs the right executable?

    Rgx

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: very strange behaviour

    Maybe you should change KDevelop's project settings instead?

    But if you insist on changing the project file, you can set a DESTDIR variable and point it to the directory where the binary is to be stored.

  11. The following user says thank you to wysota for this useful post:

    regix (20th July 2006)

Similar Threads

  1. QComboBox +SUSE10.0 +qt4.1 strange behavior
    By antonio.r.tome in forum Qt Programming
    Replies: 6
    Last Post: 20th March 2006, 18:49
  2. Setting behaviour in designer
    By Morea in forum Qt Tools
    Replies: 3
    Last Post: 19th March 2006, 16:33
  3. Different behaviour on different distributions
    By Kumula in forum Qt Programming
    Replies: 17
    Last Post: 7th March 2006, 00:58
  4. Replies: 1
    Last Post: 26th February 2006, 06:52
  5. [Qt 4.1] Strange behaviour with QTableView
    By fane in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 07:17

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
  •  
Qt is a trademark of The Qt Company.