Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Please help me - make error

  1. #1
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Please help me - make error

    I run the sample project and got error

    The project - C:\Qt\4.3.3\examples\widgets\imageviewer
    ===========
    Severity and Description Path Resource Location Creation Time Id
    make[1]: *** [release\imageviewer.exe] Error 1 imageviewer line 0 1198013082034 730
    make: *** [release] Error 2 imageviewer line 0 1198013082034 731
    ===========

    When I import the project it works fine but, I added - save option and got this error. Since there is not line number I am not sure how to debug it
    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    Can you post some code?

  3. #3
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default

    just past here? I am based on example like I wrote. I mark the changed I did
    BTW: anyonw knows why there is no distractor?
    Attached Files Attached Files
    Last edited by marcel; 19th December 2007 at 10:29.

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    I hope this
    ===========================================
    imageviewer.h
    ===========
    isn't part of the header.

    BTW: anyonw knows why there is no distractor?
    Because the actions and menus are deleted by their QObject parents. Now that you've added the QImage pointer you should add a destructor and delete that QImage in there.

  5. #5
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Please help me - make error

    yes, sorry, I just added is by mistake to the forum- it is not in the code
    ===========================================
    imageviewer.h
    ===========
    ---------------------------------------------------------------
    I attached all the file at the end of my last message.
    ---------------------------------------------------------------


    about the distractor:
    you wrote
    "now that you've added the QImage pointer you should add a destructor and delete that QImage in there"

    but what about the QLabel? I don't see why there is no distractor for the label, there is no difference between QLabel and QImage (or I am wrong?)
    thanks

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    but what about the QLabel? I don't see why there is no distractor for the label, there is no difference between QLabel and QImage (or I am wrong?)
    thanks
    QObject docs:
    QObjects organize themselves in object trees. When you create a QObject with another object as parent, the object will automatically add itself to the parent's children() list. The parent takes ownership of the object i.e. it will automatically delete its children in its destructor. You can look for an object by name and optionally type using findChild() or findChildren().
    But if you QObject is parent less, you need to take care of cleaning it your self.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    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: Please help me - make error

    Quote Originally Posted by high_flyer View Post
    But if you QObject is parent less, you need to take care of cleaning it your self.
    Just note that even if you didn't point the parent explicitely, the widget might get reparented by Qt (for instance if you add it to a layout).

  8. #8
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Please help me - make error

    now I understand the the distractor aspect, thanks.
    is it a mistake to write distractor, or is it just not needed?


    still have the make problem and my project is stuck. can anyone assist me please?
    I use QT Eclipse integration.

  9. #9
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    When I import the project it works fine but, I added - save option and got this error.
    What steps did you take?
    Can you list them in order?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  10. #10
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Please help me - make error

    sure
    yo can also see them in the files above in their content(I maked them)
    oops is it possible that someone erased them?
    hope it will bw clear now
    I chnage 2 file: imagevewer.h ,imagevewer.cpp
    I wanted to add save and more menu-effects
    Last edited by marcel; 19th December 2007 at 12:20. Reason: Removed unnecessary code...

  11. #11
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    oops is it possible that someone erased them?
    Yes, I deleted the inline code because you already attached the source files.
    Please don't post anymore code that already is in the files you attached.

  12. #12
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    I didn't mean code changes, but in the project.
    But that is not relevant I see, since you changed only code in already existing project files, so basically your project is the same as before the changes if I understand correctly.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  13. #13
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    if you do qmake make from the console (Qt console!) does it compile then?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  14. #14
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Please help me - make error

    Hi All
    I changed the code from the original project. I wrote the changes above but marcel prefer to delete them
    like I wrote I add save and effect that were not in the original project. if the project file doesn't change automaticly I didn't change it.

    ok, did my best and make in prompt window
    this is the result.
    BTW:this is the way you debug in QT? not so freindly:-(
    -----------------------------------------------------------------------------------------------------
    :\download\poy>make imageviewer
    ++ imageviewer.cpp -o imageviewer
    mageviewer.cpp:37:17: QtGui: No such file or directory
    n file included from imageviewer.cpp:39:
    mageviewer.h:40:23: QMainWindow: No such file or directory
    mageviewer.h:41:20: QPrinter: No such file or directory
    ..
    ..
    ..
    see in the file attached
    Attached Files Attached Files

  15. #15
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    did you do this in Qt console or the normal console?
    It looks your Qt environment is not set in the console you did this.
    Run qmake before you run make too.

    BTW:this is the way you debug in QT? not so freindly:-(
    Well, as far as windows goes, I find it much friendlier then the IDE's.
    Usually, all you need to do is qmake & make and it will compile (provided your environment is setup correctly), while the IDE will tangle and to problems with the same project tree.
    In addition, this way you can be sure that its not some IDE related issue.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  16. #16
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Please help me - make error

    delete existing pro file?

  17. #17
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    huh?
    why?
    If all your sources are in one directory though, you could - or just do:
    qmake -project
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  18. #18
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Please help me - make error

    I did
    what happend is:

    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake -project

    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>make imagevier
    mingw32-make: *** No rule to make target `imagevier'. Stop.

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

    Quote Originally Posted by Gily View Post
    I wrote the changes above but marcel prefer to delete them
    I asked him to. Don't expect us to read two codes and compare them line by line manually. We assumed both sets contain the same content.

    Quote Originally Posted by Gily View Post
    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake -project

    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>make imagevier
    mingw32-make: *** No rule to make target `imagevier'. Stop.
    The steps are qmake -project && qmake && make.

  20. #20
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Please help me - make error

    this is what happend


    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake -project

    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake poy3.pro

    C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>make roy3
    mingw32-make: *** No rule to make target `roy3'. Stop.
    ==========================================
    I saw there is poy3.pro in the folder
    ==========================================
    "asked him to. Don't expect us to read two codes and compare them line by line manually. We assumed both sets contain the same content."
    I am sorry I just wanted to give all the information have.
    at the first time I manualy added //change near every line I changed
    in the second time I just put the code I changed
    please tell me what is the best way to give the info, so I can be helped
    thanks

Similar Threads

  1. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 13:57
  2. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 03:49
  3. Qtopia core 4.2.2 cross compile make error
    By smiyai18 in forum Installation and Deployment
    Replies: 2
    Last Post: 28th August 2007, 18:04
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 13:19
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 13:54

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.