Results 1 to 7 of 7

Thread: Too simple compile error to be found by me??!!!

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Angry Too simple compile error to be found by me??!!!

    God damn, I am getting nervously mad!!!

    I try to compile my project and in the line:
    Qt Code:
    1. class CMerchandizeBrowser(QWidget* pParent) : public QGLWidget
    To copy to clipboard, switch view to plain text mode 
    I get following compilation error:
    Qt Code:
    1. In file included from COperationWIndow.h:27,
    2. from CMainWindow.h:11,
    3. from CMainWindow.cpp:1:
    4. CMerchandizeBrowser.h:31: error: expected `)' before '*' token
    5. CMerchandizeBrowser.h:31: error: expected `,' or `;' before '*' token
    6. mingw32-make[1]: *** [debug/CMainWindow.o] Error 1
    7. mingw32-make[1]: Leaving directory `C:/Documents and Settings/markofr/workspace/eROSystem'
    8. mingw32-make: *** [debug] Error 2
    To copy to clipboard, switch view to plain text mode 

    I simply do not see what is wrong with this line of code. Can comeone help me please???!!!
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Too simple compile error to be found by me??!!!

    You're mixing up class declaration and constructor declaration.
    Qt Code:
    1. class MyClassName : public MyBaseClassName
    2. {
    3. public:
    4. MyClassName(/*ctor params*/);
    5. };
    To copy to clipboard, switch view to plain text mode 
    PS. This is a basic C++ issue which has nothing to do with Qt..
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Too simple compile error to be found by me??!!!

    God damn, I will never change the code in drunk state again.
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    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: Too simple compile error to be found by me??!!!

    Quote Originally Posted by MarkoSan View Post
    God damn, I will never change the code in drunk state again.
    It's still better than ending with "it works but I don't know how" kind of code written directly in machine code.

    (To avoid possible questions: no, it wasn't me.)

  5. #5
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Thanks
    2
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Too simple compile error to be found by me??!!!

    Quote Originally Posted by jacek View Post
    It's still better than ending with "it works but I don't know how" kind of code written directly in machine code.
    Isn't that how we all tended to finish our assembler assignments at university? At least that goes for me
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

  6. #6
    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: Too simple compile error to be found by me??!!!

    Quote Originally Posted by Methedrine View Post
    Isn't that how we all tended to finish our assembler assignments at university?
    I wasn't talking about assembly.

    I remember that once I was sitting till 4 am to make my FAT12 routines work. I think assembly is a really good way to learn to divide your code into subroutines, because otherwise you will get lost really fast.
    Last edited by jacek; 20th December 2007 at 13:36. Reason: typo

  7. #7
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Too simple compile error to be found by me??!!!

    Quote Originally Posted by jacek View Post
    I wan't talking about assembly.

    I remember that once I was sitting till 4 am to make my FAT12 routines work. I think assembly is a really good way to learn to divide your code into subroutines, because otherwise you will get lost really fast.
    Assembly is the far the best language, but not in a drunk state. Subroutines in assembly can get weird names if you are drunk and programming in assembly.
    Qt 5.3 Opensource & Creator 3.1.2

Similar Threads

  1. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 20:56
  2. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 17:21

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.