Page 1 of 3 123 LastLast
Results 1 to 20 of 50

Thread: problem with linking

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default problem with linking

    hi, I've a problem. sometimes my application COMPILING (.net2003) goes very slow (some minutes). Seems it's going slow on mainform.ui.h. What can be the problem? thanks
    Qt Code:
    1. Generate imagecollection
    2. Compiling...
    3. mainform.cpp
    4. mainform.ui.h(476) : warning C4100: 'action' : unreferenced formal parameter
    5. mainform.ui.h(996) : warning C4100: 'val' : unreferenced formal parameter
    To copy to clipboard, switch view to plain text mode 
    my app seems are stopping here above
    Last edited by mickey; 29th May 2006 at 19:01.
    Regards

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with linking

    The warning might not be the only reason for your compilation to become slow. The problem might be somewhere else also.

    Qt Code:
    1. mainform.ui.h(476) : warning C4100: 'action' : unreferenced formal parameter
    2. mainform.ui.h(996) : warning C4100: 'val' : unreferenced formal parameter
    To copy to clipboard, switch view to plain text mode 

    These warnings mean that you are passing the parameters action and val is some function but you are not using them anywhere in the function.

  3. #3
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    I know the problems aren't warnings. this is a way to see you where the compiling go slow......
    Regards

  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 with linking

    Do you have any includes in the .ui.h file? If so, could you post respective lines here?

  5. #5
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    Qt Code:
    1. #include <iostream>
    2. #include <qfont.h>
    3. #include <qtimer.h>
    4. #include <qdom.h>
    5. #include <qfiledialog.h>
    6. #include <qprinter.h>
    7. #include <qstatusbar.h>
    8. #include <qpainter.h>
    9. #include <qrect.h>
    To copy to clipboard, switch view to plain text mode 

    sorry, I don't sure to understand.
    Mainform.ui.h is a file created from desinger; I haven't included it anywhere...compiling is succefull, but now is became slow; where do I include it??
    Last edited by mickey; 31st May 2006 at 19:39.
    Regards

  6. #6
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    Are the include lines above what you wanted?thnsks
    Regards

  7. #7
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    The liens of include are those:
    Qt Code:
    1. #include <iostream>
    2. #include <qfont.h>
    3. #include <qtimer.h>
    4. #include <qdom.h>
    5. #include <qfiledialog.h>
    6. #include <qprinter.h>
    7. #include <qstatusbar.h>
    8. #include <qpainter.h>
    9. #include <qrect.h>
    To copy to clipboard, switch view to plain text mode 
    Regards

  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 with linking

    Your includes are fine, it's not a problem with them.

  9. #9
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    is it better put them in implementaion (from designer)? what's the problem?thanks
    Regards

  10. #10
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    sorry .Have anyone any hints on my slow linking speed? it goes slow when I change something in mainform.ui.h.....so I thought the problem is there....
    Regards

  11. #11
    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 with linking

    The linking itself should have more or less constant time. The compilation time may vary. Are you sure it is the linking phase that is so time consuming?

  12. #12
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    no I'm not sure; I see if I do ; nmake clean; qmake; nmake; on nmake it seems stop on this:
    Qt Code:
    1. qmake_image_collection.cpp
    2. Generating Code...
    To copy to clipboard, switch view to plain text mode 
    then if I change mainform.ui.h and type nmake it seems stop on mainform.cpp
    Regards

  13. #13
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: problem with linking

    If it really is mainform.cpp, maybe you can comment out (temporarily) certain parts of the code in that file to see what might be causing it (though making sure it's still compileable)? Divide and conquer, etc.
    Was there something you changed recently that caused the slow linking? Added any libraries?

    If it's always been slow, I'd just go ahead and blame Microsoft.
    Software Engineer



  14. #14
    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 with linking

    Quote Originally Posted by mickey
    no I'm not sure; I see if I do ; nmake clean; qmake; nmake; on nmake it seems stop on this:
    Qt Code:
    1. qmake_image_collection.cpp
    2. Generating Code...
    To copy to clipboard, switch view to plain text mode 
    then if I change mainform.ui.h and type nmake it seems stop on mainform.cpp
    Then it might be caused by a large number of includes or cycles in inclusions. Try using precompiled headers and don't double include items in .ui.h and designer implementation section. It's enough to include in one of those places (as .ui.h is included into generated implementation file).

  15. #15
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    thanks; I have some # at the begon of mainform.ui.h file; other are in implementation from designer (they aren't the same!). is this ok?
    THen I subclassed mainform to myMainform: now in mymainform.cpp file I find same include that are in mainform.ui.h; can I avoid this? and how? can this a problem?thanks...
    Regards

  16. #16
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    only possible recursive incude is "mywidget.h" put in mainform.ccp from compiler, and a ponter to mainForm* w, member of mywidget class (inside mywidget.h, but I need it there!!). anyway I use
    Qt Code:
    1. #ifndef MYWIDGET_H
    2. #define MYWIDGET_H
    3. .......................
    4. #endif
    To copy to clipboard, switch view to plain text mode 
    in mywidget.h. Can it be? can I avoid?
    Regards

  17. #17
    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 with linking

    Quote Originally Posted by mickey
    Can it be? can I avoid?
    First of all try to use precompiled headers and see how much it helps (it will help much, but if it help too much it means that you may have some include cycles or something like that).

  18. #18
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    sorry for question, but what are the precompiled headers? I think you're refer an .net option but wich? I choose generate automatically and don't change nothing in compiling..; others get errors...
    Attached Images Attached Images
    Regards

  19. #19
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: problem with linking

    I don't know if can useful to solve problem but after generation code......(where sometimes goes slow) after appear this:
    Generating Code...
    cl -c -nologo -Zm200 -W3 -w34100 -w34189 -MD -O1 -GX -DUNICODE -DWIN32 -DQT_THREAD_SUPPORT -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEB
    UG -I".." -I"C:\code\glew\include" -I"C:\Qt\3.2.0Educational\include" -I"ui\\" -I"D:\XXX\prog\XEd" -I"D:\XXX\prog\XEd" -I"moc\\" -I"C:\Qt\3.2.0Educational\mkspecs\win32-msvc.net" -Foobj\ @C:\DOCUME~1\as\IMPOST~1\Temp\nm126.tmp
    Last edited by jacek; 20th July 2006 at 13:39. Reason: changed [ code ] to [ quote ] to allow wrapping of long lines
    Regards

  20. #20
    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 with linking

    Quote Originally Posted by mickey
    sorry for question, but what are the precompiled headers? I think you're refer an .net option but wich? I choose generate automatically and don't change nothing in compiling..; others get errors...
    Read the article in our wiki.

Similar Threads

  1. Permission denied error during linking
    By bashamehboob in forum Newbie
    Replies: 2
    Last Post: 15th April 2006, 14:02
  2. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 22:36
  3. Replies: 16
    Last Post: 7th March 2006, 16:57
  4. Replies: 4
    Last Post: 20th February 2006, 10:11
  5. Runtime dynamic linking + Qt4 problem
    By _Ramirez_ in forum Qt Programming
    Replies: 5
    Last Post: 11th February 2006, 15:28

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.