Results 1 to 16 of 16

Thread: Qt4 MacOSX UB Xcode and a static Qt build?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2007
    Posts
    17
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qt4 MacOSX UB Xcode and a static Qt build?

    Quote Originally Posted by jacek View Post
    Could you post the exact error message (the first one)?
    I don't need to!

    Hmmm, lemme see. The typedef is to GLuint which one would suppose to be an unsigned int, right? And obviously it worked for the originator in Windows. But, noooo, for Apple it is typedef'd as an unsigned long - and that is all it took to generate these errors!

    Sweet mama of yeshua! No problems with OpenGL or anything else - it's simply a matter of casting the bastard values.

    Still some errors to work out - like QFrame not being a class or namespace. At least it's now down to Qt related stuff.

    I'll be back if things like that can't be resolved.

    Thanks!
    Robert

  2. #2
    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: Qt4 MacOSX UB Xcode and a static Qt build?

    Quote Originally Posted by kuroyume0161 View Post
    it's simply a matter of casting the bastard values
    It depends on whether you are casting unsigned int to GLuint or vice versa. What if sizeof(unsigned long) > sizeof(unsigned int)? I haven't seen your code, but maybe using GLuint instead of casting will be a safer solution?

  3. #3
    Join Date
    Mar 2007
    Posts
    17
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qt4 MacOSX UB Xcode and a static Qt build?

    Quote Originally Posted by jacek View Post
    It depends on whether you are casting unsigned int to GLuint or vice versa. What if sizeof(unsigned long) > sizeof(unsigned int)? I haven't seen your code, but maybe using GLuint instead of casting will be a safer solution?
    I'm trying not to change *any* of his code - this is not my application, I'm just porting it to Mac since he cannot.

    Should not cause any problems as the variable texobj is unsigned int and the cast is to (const GLuint*)&m->texobj. But if it does, I might be able to get away with changing the variable to unsigned long.

    Now my problem is this line:

    splitter->setFrameShadow(QFrame::Shadow::Sunken);

    is generating a compiler error:

    error: 'class QFrame::Shadow' is not a class or namespace

    (?) It can't possibly be because QtGui is not included (it is both as static lib and #include <QtGui>) as just above it is a mention of QWidget and QSplitter - no errors on them. The compiler doesn't appear to like that QFrame is being used in a static mode to get to these enums. Any ideas?

    Thanks,
    Robert

  4. #4
    Join Date
    Mar 2007
    Posts
    17
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qt4 MacOSX UB Xcode and a static Qt build?

    My thinking here on the QFrame::Shadow and QFrame::Shape errors is that gcc might not be understandin' the concept of something like this:

    Qt Code:
    1. class QFrame
    2. {
    3. enum Shape
    4. {
    5. ...
    6. Panel = 0x0002,
    7. ...
    8. }
    9. }
    To copy to clipboard, switch view to plain text mode 

    I guess that Visual Studio has no problems with the construct causing the error, but Xcode don't like it.

    Should I just hard code the value (yuck) or is there another way to dereference the enum within the class (something that I'm not too familiar with - my enums are always global).

    Thanks,
    Robert

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
  •  
Qt is a trademark of The Qt Company.