Building fails under Mac OS X 10.8

Issue #27 new
Markus Klingsiek created an issue

Just tried to make latest commit under 10.8. Everything worked fine until:

(...)
compiling debug/.rcc/qrc_resources.cpp
rm -f QxtWidgets QxtWidgets.framework/QxtWidgets ../../lib/QxtWidgets.framework/QxtWidgets
linking ../../lib/QxtWidgets.framework/QxtWidgets
Undefined symbols for architecture x86_64:
  "_CGSGetWindowProperty", referenced from:
      QxtWindowSystem::windowTitle(long)   in qxtwindowsystem_mac.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../lib/QxtWidgets.framework/QxtWidgets] Error 1
make: *** [sub-src-widgets-make_default] Error 2

Comments (4)

  1. Andrew Korzhuev

    If you're not planning to use this function, you can simply remove its contents and it will build correctly:

    diff --git a/src/widgets/mac/qxtwindowsystem_mac.cpp b/src/widgets/mac/qxtwindowsystem_mac.cpp
    index 63cab38..de4a89c 100644
    --- a/src/widgets/mac/qxtwindowsystem_mac.cpp
    +++ b/src/widgets/mac/qxtwindowsystem_mac.cpp
    @@ -89,11 +89,7 @@ QString QxtWindowSystem::windowTitle(WId window)
         // most of CoreGraphics private definitions ask for CGSValue as key but since
         // converting strings to/from CGSValue was dropped in 10.5, I use CFString, which
         // apparently also works.
    -    err = CGSGetWindowProperty(connection, window, (CGSValue)CFSTR("kCGSWindowTitle"), &windowTitle);
    -    if (err != noErr) return QString();
    -
    -    // this is UTF8 encoded
    -    return QCFString::toQString((CFStringRef)windowTitle);
    +    return QString();
     }
    
     QRect QxtWindowSystem::windowGeometry(WId window)
    
  2. Destan Sarpkaya

    After the patch the build succeeded, thanks. Note that I have used the latest snapshot of the repo (5b312c4). [Mac 10.8.2 32bit]

    Seems that version 0.6.3 begs you to be released ;)

  3. Log in to comment