Results 1 to 20 of 50

Thread: problem with linking

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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

  2. #2
    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

  3. #3
    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).

  4. #4
    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

  5. #5
    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 12:39. Reason: changed [ code ] to [ quote ] to allow wrapping of long lines
    Regards

  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 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.

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

    Default Re: problem with linking

    ok I get out some include from mainform.ui.h; I change .pro and I inserte also stable.h line in include file (in the .pro I mean. right this??). I put #include "stable.h" in mainform.ui.h file
    Is it all right? for the moment compilation time is the same...
    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

    Quote Originally Posted by mickey
    ok I get out some include from mainform.ui.h; I change .pro and I inserte also stable.h line in include file (in the .pro I mean. right this??). I put #include "stable.h" in mainform.ui.h file
    Is it all right? for the moment compilation time is the same...
    Hmm... The article clearly mentions not to use stable.h as a regular include file, so it's not alright. Did you run qmake after modyfing the project file? And do you meet the requirements for using precompiled headers? Is your compiler supported?

  9. #9
    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

    Incidentally, what are the specs on your machine? How fast is it? How much memory does it have?
    Software Engineer



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

    Default Re: problem with linking

    500mb, centrino1700;
    when I type nmake it's stopping for 49 seconds; after compiling re-start;
    I DON'T know if my steps for header precompilated are ok (see before)..i putted about 50 include inside stable.h; don't change anythings.......
    Regards

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

    Default Re: problem with linking [SOLVED????]

    Before:
    Qt Code:
    1. CONFIG += qt opengl console
    To copy to clipboard, switch view to plain text mode 
    an now:
    Qt Code:
    1. CONFIG += qt opengl console debug
    To copy to clipboard, switch view to plain text mode 

    now it dosn't stop in compiling..
    Do anyone get me any information? Probabily I don't know........THANKS
    Regards

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

    Default Re: problem with linking [SOLVED????]

    in effect after I take out stable.h from header lines in .pro but it seems work in the same way yes I typed qmale and nothing requirement.......I use .net 2003

    Quote Originally Posted by mickey
    Before:
    Qt Code:
    1. CONFIG += qt opengl console
    To copy to clipboard, switch view to plain text mode 
    an now:
    Qt Code:
    1. CONFIG += qt opengl console debug
    To copy to clipboard, switch view to plain text mode 
    now it dosn't stop in compiling..
    Do anyone get me any information? Probabily I don't know........THANKS
    But why this above? I notice, when I import project in .net and then type compile option (only compile not build) an apper a "non specificated error" what's it?? why with debug line in .pro dosn't stop but I have this problem in .net? thanks
    Regards

  13. #13
    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

    Did you actually add the CONFIG += precompile_header statement in the project file? Could you compile your project manually using nmake and paste every line of output which doesn't contain the actual compiler command? Remember to run nmake clean before you run nmake.

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

    Default Re: problem with linking

    I sent to you!
    Last edited by mickey; 21st July 2006 at 01:42.
    Regards

  15. #15
    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

    What about the project file? Because the output you sent doesn't even mention a try to precompile headers.

Similar Threads

  1. Permission denied error during linking
    By bashamehboob in forum Newbie
    Replies: 2
    Last Post: 15th April 2006, 13:02
  2. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  3. Replies: 16
    Last Post: 7th March 2006, 15:57
  4. Replies: 4
    Last Post: 20th February 2006, 09:11
  5. Runtime dynamic linking + Qt4 problem
    By _Ramirez_ in forum Qt Programming
    Replies: 5
    Last Post: 11th February 2006, 14: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.