Results 1 to 8 of 8

Thread: Problem in compiling

  1. #1
    Join Date
    Jul 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Problem in compiling

    Hi!

    I have a programing in Qt 4.4.

    I write all code and this code is compiling without errors. The program compiled don't show errors too in execution. The code is 2000 lines...

    So, this program make a long loop (10.000 - 50.000 times), if i compile a debug version, it's works, the result is fine... But, if i compile a release version, the code don't work well and the result is wrong...

    I don't know what it is, is the same code, i don't make changes...

    Someone help me?

    Thks...

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

    Default Re: Problem in compiling

    We'd have to know more details and see at least portions of the code.

  3. #3
    Join Date
    Jul 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Re: Problem in compiling

    Ok, no problem...

    My code is under GPL license

    Ok, i will begin with main function in my looping. This function determine the flow of a river in vector format.

    I saw a problem maybe at the beginning of this code. For example, in debug compile, this loop run 100 times. In release compile, this run 100 times too, but leaves the first return.

    But in both compiles I used the EVEN CODE and EVEN INPUT.

    So, this is the beginning of the main function of my loop...

    Qt Code:
    1. bool CHydroFlow::DetermineFlow(const int indSHPObj)
    2. {
    3.  
    4. pSHPObject pHidLine = HidLn->SHPObjs[indSHPObj];
    5. int FlowHidLine = HidLn->Flows[indSHPObj];
    6. int OrderStrahlerHidLine = 0;
    7. int OrderShreveHidLine = 0;
    8. if (HFParams.HFOptions.OrderStrahler) {
    9. OrderStrahlerHidLine = HidLn->OrdersStrahler[indSHPObj];
    10. };
    11. if (HFParams.HFOptions.OrderShreve) {
    12. OrderShreveHidLine = HidLn->OrdersShreve[indSHPObj];
    13. };
    14. if ((FlowHidLine != 0) && (OrderStrahlerHidLine != 0) || (!HFParams.HFOptions.OrderStrahler)
    15. && ((OrderShreveHidLine != 0) || (!HFParams.HFOptions.OrderShreve)))
    16. return true; //If above is true, then nothing to do
    To copy to clipboard, switch view to plain text mode 
    <CONTINUE...>
    Last edited by wysota; 9th July 2008 at 04:44. Reason: missing [code] tags

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

    Default Re: Problem in compiling

    You might be using some uninitialized variable somewhere that might be initialized differently in debug and release modes.

  5. #5
    Join Date
    Jul 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation Re: Problem in compiling

    How is this possible?
    Initialized differently!?

    But all variables are initialized before... I will see that...

    Thks

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

    Default Re: Problem in compiling

    Are these initialized?
    HFParams.HFOptions.OrderStrahler
    HFParams.HFOptions.OrderShreve

  7. #7
    Join Date
    Jul 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Re: Problem in compiling

    There variables are input parameters of my class...

    This code is part of a class...

    Thks

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

    Default Re: Problem in compiling

    And what are their values at the beginning of this code block?

Similar Threads

  1. Problem compiling Qt4.4.0 with mingw-static in examples/webkit
    By KjellKod in forum Installation and Deployment
    Replies: 2
    Last Post: 10th July 2008, 13:32
  2. xlC V9 problem compiling Qt 3.3.8
    By kevinm in forum Installation and Deployment
    Replies: 0
    Last Post: 8th April 2008, 20:23
  3. compiling problem / Qt DLL files
    By ht1 in forum Newbie
    Replies: 1
    Last Post: 5th January 2008, 17:58
  4. Problem compiling ibase driver
    By SteM in forum Installation and Deployment
    Replies: 12
    Last Post: 24th September 2007, 22:26
  5. Replies: 10
    Last Post: 28th April 2006, 15:48

Tags for this Thread

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.