Page 3 of 3 FirstFirst 123
Results 41 to 50 of 50

Thread: problem with linking

  1. #41
    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

    You have some nasty errors in your project. It refuses to compile because of some missing files.

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

    Default Re: problem with linking

    nasty errors? missing files? I don't sure to understand the thing....
    Regards

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

    My compilation log:
    $ qmake
    WARNING: Failure to find: mylightdialog.h
    WARNING: Failure to find: ../MG/face.h
    WARNING: Failure to find: myfiledialog.h
    WARNING: Failure to find: wwFloatspinbox.h
    WARNING: Failure to find: mylightdialog.cpp
    WARNING: Failure to find: myfiledialog.cpp
    WARNING: Failure to find: wwFloatspinbox.cpp
    WARNING: Failure to find: ../MG/face.cpp


    $ make
    /usr/lib/qt3//bin/uic initplaindialog.ui -o .ui/initplaindialog.h
    /usr/lib/qt3//bin/uic mainform.ui -o .ui/mainform.h
    /usr/lib/qt3//bin/uic configDialog.ui -o .ui/configDialog.h
    /usr/lib/qt3//bin/uic progressdialog.ui -o .ui/progressdialog.h
    /usr/lib/qt3//bin/uic lightdialog.ui -o .ui/lightdialog.h
    test -d Editor.gch/ || mkdir -p Editor.gch/
    g++ -x c++-header -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I.. -IC:\code\glew\include -I/usr/lib/qt3//include -I/usr/X11R6/include -I/usr/X11R6/include -I.ui/ -I. -I.moc/ stable.h -o Editor.gch/c++
    stable.h:12:26: error: myfiledialog.h: No such file or directory
    In file included from ../vcg/Point3.h:32,
    from ../MG/plain.h:5,
    from ../MG/scene.h:4,
    from .ui/mainform.h:16,
    from mymainform.h:4,
    from stable.h:19:
    ../vcg/Utility.h:76:7: warning: no newline at end of file
    In file included from ../MG/scene.h:4,
    from .ui/mainform.h:16,
    from mymainform.h:4,
    from stable.h:19:
    ../MG/plain.h:15:18: error: face.h: No such file or directory
    In file included from ../MG/scene.h:8,
    from .ui/mainform.h:16,
    from mymainform.h:4,
    from stable.h:19:
    ../MG/light.h:70:7: warning: no newline at end of file
    stable.h:21:50: error: mywidget.h: No such file or directory
    stable.h:28:30: error: myprogressDialog.h: No such file or directory
    In file included from stable.h:56:
    ./myLightDialog.h:27:8: warning: no newline at end of file
    stable.h:86:7: warning: no newline at end of file
    ../MG/plain.h:52: error: 'Face' was not declared in this scope
    ../MG/plain.h:52: error: template argument 1 is invalid
    ../MG/plain.h:52: error: template argument 2 is invalid
    ../MG/plain.h:19: warning: 'class MMCell' has virtual functions but non-virtual destructor
    ../MG/plain.h:77: error: 'GLuint' was not declared in this scope
    ../MG/plain.h:77: error: template argument 1 is invalid
    ../MG/plain.h:77: error: template argument 2 is invalid
    ../MG/plain.h:91: error: 'GLint' does not name a type
    ../MG/plain.h:126: error: 'GLuint' does not name a type
    ../MG/plain.h:127: error: 'GLuint' does not name a type
    ../MG/plain.h:128: error: 'GLuint' does not name a type
    ../MG/plain.h:159: error: 'GLint' does not name a type
    ../MG/plain.h: In member function 'int Plain::get_z()':
    ../MG/plain.h:161: warning: converting to 'int' from 'float'
    make: *** [Editor.gch/c++] Error 1

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

    Default Re: problem with linking

    of course I don't understand many of these errors. but my compilation is successful; slow but successful; I haven't that warning even if I set level warning 4 in .net...Why this difference...? the files missing...there are! or not?
    Regards

  5. #45
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with linking

    Quote Originally Posted by mickey
    Why this difference...?
    IMO the problem in file names. In the .pro file all file names are in lowercase, but some files have mixed case in their names --- this doesn't make any difference on windows, but on Linux file names are case sensitive.

  6. #46
    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

    As you can see here:
    test -d Editor.gch/ || mkdir -p Editor.gch/
    g++ -x c++-header -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I.. -IC:\code\glew\include -I/usr/lib/qt3//include -I/usr/X11R6/include -I/usr/X11R6/include -I.ui/ -I. -I.moc/ stable.h -o Editor.gch/c++
    gcc tries to build the precompiled header. I haven't seen a similar line in your log. Maybe your compiler doesn't support it after all.

    BTW. You should change your stable.h. Only include directives should be there. No "using namestace std" calls or simmilar. And put there only those files which are known not to be changed during the life of the project (like Qt includes) and try to avoid includes local to your project unless you're sure they won't change frequently. And please, NEVER include "stable.h" from other files. Only include those files which you really need. Otherwise you'll increase the compilation complexity for environments which don't support precompiled headers.

    That part is interesting too:
    -IC:\code\glew\include
    What happens if you try to compile the project on a machine which uses different paths? And try to use slashes instead of backslashes, it's more portable.

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

    Default Re: problem with linking

    Quote Originally Posted by wysota
    As you can see here:

    gcc tries to build the precompiled header. I haven't seen a similar line in your log. Maybe your compiler doesn't support it after all.

    BTW. You should change your stable.h. Only include directives should be there. No "using namestace std" calls or simmilar. And put there only those files which are known not to be changed during the life of the project (like Qt includes) and try to avoid includes local to your project unless you're sure they won't change frequently. And please, NEVER include "stable.h" from other files. Only include those files which you really need. Otherwise you'll increase the compilation complexity for environments which don't support precompiled headers.

    That part is interesting too:
    What happens if you try to compile the project on a machine which uses different paths? And try to use slashes instead of backslashes, it's more portable.
    If I tried to copiled on other machine wich different path glew.h doesn't compile...
    I don't still understand: why your compiler gets error and mine not?
    But the thing that I take out toolbox the time compiling is right, what is it? a case?
    Ok my compiler dosns't support it, but what can be the cause of that? what do you say about this (i activated debug mode):
    Qt Code:
    1. mywidget.cpp(1279) : warning C4100: 'e' : unreferenced formal parameter
    2. mywidget.cpp(1332) : warning C4100: 'e' : unreferenced formal parameter
    3. mymainform.cpp
    4. Generating Code...
    5. c:\programmi\microsoft visual studio .net 2003\vc7\include\xtree(1136) : warning C4702: unreachable code
    6. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    7. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    8. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    9. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    10. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    11. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    12. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    13. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    14. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    15. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    16. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    17. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    18. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    19. c:\programmi\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    20. c:\programmi\microsoft visual studio .net 2003\vc7\include\xtree(1136) : warning C4702: unreachable code
    21. //here is working the same long time.....
    To copy to clipboard, switch view to plain text mode 
    Last edited by mickey; 21st July 2006 at 21:45.
    Regards

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

    Default Re: problem with linking

    Hi, I don't know what I changed (some include <vector>) but this warning go up.. (i'm set level warnig4 from .net); do anyone say me if this can be error; I tried this on an old copy of my project and those warning there aren't...in that copy I don't declare any vector inside some .h; but I need that...
    Qt Code:
    1. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    2. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    3. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    4. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    5. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1116) : warning C4702: unreachable code
    6. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1118) : warning C4702: unreachable code
    7. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1121) : warning C4702: unreachable code
    8. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1136) : warning C4702: unreachable code
    9. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    10. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    11. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1136) : warning C4702: unreachable code
    12. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    13. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    14. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    15. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    16. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    17. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    18. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1136) : warning C4702: unreachable code
    19. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    20. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    21. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    22. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    23. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    24. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    25. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    26. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    27. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    28. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    29. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    30. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    31. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(834) : warning C4702: unreachable code
    32. c:\programs\microsoft visual studio .net 2003\vc7\include\vector(857) : warning C4702: unreachable code
    33. c:\programs\microsoft visual studio .net 2003\vc7\include\xtree(1136) : warning C4702: unreachable code
    34. Linking...
    35. LINK : warning LNK4199: /DELAYLOAD:comdlg32.dll ignored; no imports found from comdlg32.dll
    36. LINK : warning LNK4199: /DELAYLOAD:oleaut32.dll ignored; no imports found from oleaut32.dll
    37. LINK : warning LNK4199: /DELAYLOAD:winmm.dll ignored; no imports found from winmm.dll
    38. LINK : warning LNK4199: /DELAYLOAD:wsock32.dll ignored; no imports found from wsock32.dll
    39. LINK : warning LNK4199: /DELAYLOAD:winspool.dll ignored; no imports found from winspool.dll
    To copy to clipboard, switch view to plain text mode 
    Last edited by mickey; 22nd July 2006 at 01:23.
    Regards

  9. #49
    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
    I don't still understand: why your compiler gets error and mine not?
    <flame mode>Because mine is better?</flame mode>

    And seriously, I think Jacek already told you why...

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

    Default Re: problem with linking

    Quote Originally Posted by wysota
    <flame mode>Because mine is better?</flame mode>
    And seriously, I think Jacek already told you why...
    HI,
    I compiled app under linux and I see that the time of compile&link is THE SAME (2 seconds difference) ; but the difference is that under linux the process doesn't stop in any place; it was printing lines without stop....
    can I email you output of compile? (maybe you'll can see something wrong) Thanks
    Regards

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.