Results 1 to 11 of 11

Thread: thousands of system/library/frameworks errors of declaration for parameters... (MAC)

  1. #1
    Join Date
    Dec 2010
    Posts
    71
    Thanks
    26
    Platforms
    Windows

    Exclamation thousands of system/library/frameworks errors of declaration for parameters... (MAC)

    Hi,

    I'm trying to port a Linux application to Mac using Qt. The same code runs perfectly on linux but on Mac I get thousands (~22700) of errors like:

    Qt Code:
    1. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:126: error: declaration for parameter 'NSBlack' but no such parameter
    2. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:125: error: declaration for parameter 'NSDarkGray' but no such parameter
    3. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:124: error: declaration for parameter 'NSLightGray' but no such parameter
    4. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:123: error: declaration for parameter 'NSWhite' but no such parameter
    5. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:110: error: declaration for parameter 'NSWindowDepth' but no such parameter
    6. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:76: error: declaration for parameter 'NSColorRenderingIntent' but no such parameter
    7. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:65: error: declaration for parameter 'NSFocusRingType' but no such parameter
    8. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:56: error: declaration for parameter 'NSFocusRingPlacement' but no such parameter
    9. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:48: error: declaration for parameter 'NSWindowOrderingMode' but no such parameter
    10. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:40: error: declaration for parameter 'NSBackingStoreType' but no such parameter
    11. /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:32: error: declaration for parameter 'NSCompositingOperation' but no such parameter
    12. /System/Library/Frameworks/Foundation.framework/Headers/NSTextCheckingResult.h:32: error: declaration for parameter 'NSTextCheckingTypes' but no such parameter
    13. /System/Library/Frameworks/Foundation.framework/Headers/NSTextCheckingResult.h:25: error: declaration for parameter 'NSTextCheckingType' but no such parameter
    14. /System/Library/Frameworks/Foundation.framework/Headers/NSScriptWhoseTests.h:24: error: declaration for parameter 'NSTestComparisonOperation' but no such parameter
    15. /System/Library/Frameworks/Foundation.framework/Headers/NSScriptStandardSuiteCommands.h:19: error: declaration for parameter 'NSSaveOptions' but no such parameter
    16. /System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:45: error: declaration for parameter 'NSWhoseSubelementIdentifier' but no such parameter
    17. /System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:36: error: declaration for parameter 'NSRelativePosition' but no such parameter
    18. /System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:30: error: declaration for parameter 'NSInsertionPosition' but no such parameter
    To copy to clipboard, switch view to plain text mode 

    as well as some " i686-apple-darwin10-g++-4.2.1: -zmuldefs: linker input file unused because linking not done " errors


    Do I need to add some kind of configuration to the project.pro file in order to get rid of these framework errors?

  2. #2
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    Headers shown in those error messages are Objective-C. They can be included from Obj-C code only. For instance, from .m or .mm sources.
    Does your app include some mac-specific header directly?

  3. #3
    Join Date
    Dec 2010
    Posts
    71
    Thanks
    26
    Platforms
    Windows

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    Hi llev,

    Sorry but I don't understand your question... I have no .m or .mm files in my project too...

    This app that I'm working on has a set of different configurations (like #if defined(Q_OS_LINUX) ) for windows and linux. I copied the config from linux to be used for mac

  4. #4
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    1. The error messages you showed are from compiling stage (not from linking), correct?
    2. If they're, some source in your app includes mac-specific header, doesn't it?
    3. You could find that #include and decide whether you need it.
    For instance, NSGraphics.h header is written in Objective-C++ programming language as well as most Cocoa API headers.
    Objective-C++ sources are not compatible with C/C++ sources.
    That's what I tried to say in my previous post.
    Am I clear?

  5. The following user says thank you to llev for this useful post:

    rickrvo (13th September 2011)

  6. #5
    Join Date
    Dec 2010
    Posts
    71
    Thanks
    26
    Platforms
    Windows

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    I think I got it now.. lol

    1 - yes they are from compiling stage

    2;3 - I don't know... I don't think that it does... can you show me an example of a mac-specific header? All I know is that the app is working on windows and linux, and I used the same configuration for linux to try to build in mac.

    I think that some configuration is missing in the .pro file or, like you said, something is conflicting with the cocoa API headers.

    but for it to be returning 22k errors probably has something to do with the incompatibility...

    How do I search for these mac headers?

  7. #6
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    For instance, Obj-C headers use #import directive instead of #include one.
    Hearders which name starts with NS are likely Obj-C.
    Could you paste here a piece of build log with command line invoking compiler on some source and subsequent error messages?

  8. #7
    Join Date
    Dec 2010
    Posts
    71
    Thanks
    26
    Platforms
    Windows

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    this is the line right before it starts going mad...

    gcc -c -pipe -mmmx -fno-strict-aliasing -DVNCSHARED -DFOREVER -DNOREPEAT=0 -DNOPW=1 -DREMOTE_CONTROL=0 -DEXTERNAL_COMMANDS=0 -DFILEXFER=0 -DNOGUI -DSMALL_FOOTPRINT=1 -O2 -O2 -arch i386 -Wall -W -DHAVE_CONFIG_H -DBUILD_LIBRARY -DBUILD_ICA -D_REENTRANT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/usr/include -I../staticlib -I../staticlib/include -I../plugins/attendees/include -I../libjpeg -Isrc -I. -I../staticlib/include/rfb -Ix11 -Ix11/x11vnc -Ix11/libvncserver -Ix11/rfb -Irelease -F/Library/Frameworks -o release/x11vnc.o x11/x11vnc.c
    In file included from x11/x11vnc.c:10:
    x11/x11vnc/remote.c: In function 'process_remote_cmd':
    x11/x11vnc/remote.c:637: warning: unused parameter 'cmd'
    x11/x11vnc/remote.c:637: warning: unused parameter 'stringonly'
    In file included from x11/x11vnc.c:12:
    x11/x11vnc/userinput.c: In function 'set_ypad':
    x11/x11vnc/userinput.c:1272: warning: the address of 'xrecord_name_info' will always evaluate as 'true'
    x11/x11vnc/userinput.c: In function 'check_fixscreen':
    x11/x11vnc/userinput.c:3578: warning: type defaults to 'int' in declaration of 'dlast'
    x11/x11vnc/userinput.c: In function 'check_macosx_click_frame':
    x11/x11vnc/userinput.c:4216: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'Window'
    In file included from x11/x11vnc.c:12:
    x11/x11vnc/userinput.c: In function 'check_ncache':
    x11/x11vnc/userinput.c:9081: warning: unused variable 'retry'
    x11/x11vnc/userinput.c:9258: warning: unused variable 'valid'
    x11/x11vnc/userinput.c:9258: warning: unused variable 'state'
    x11/x11vnc/userinput.c:9258: warning: unused variable 'skip'
    x11/x11vnc/userinput.c:9258: warning: unused variable 'ns'
    x11/x11vnc/userinput.c:9254: warning: unused variable 'old_unmaps'
    x11/x11vnc/userinput.c:9253: warning: unused variable 'old_maps'
    x11/x11vnc/userinput.c:9520: warning: unused variable 'skip'
    x11/x11vnc/userinput.c:9520: warning: unused variable 'ns'
    In file included from x11/x11vnc.c:24:
    x11/x11vnc/help.c: In function 'print_help':
    x11/x11vnc/help.c:17: warning: unused parameter 'mode'
    In file included from x11/x11vnc.c:30:
    x11/x11vnc/user.c: In function 'switch_user_env':
    x11/x11vnc/user.c:695: warning: unused variable 'grp_ok'
    x11/x11vnc/user.c:691: warning: unused parameter 'uid'
    x11/x11vnc/user.c:691: warning: unused parameter 'gid'
    x11/x11vnc/user.c:691: warning: unused parameter 'fb_mode'
    x11/x11vnc/user.c: In function 'build_create_cmd':
    x11/x11vnc/user.c:1903: warning: format not a string literal and no format arguments
    x11/x11vnc/user.c: In function 'wait_for_client':
    x11/x11vnc/user.c:2638: warning: implicit declaration of function 'ssh_remote_tunnel'
    In file included from x11/x11vnc.c:37:
    x11/x11vnc/connections.c: In function 'turn_off_truecolor_ad':
    x11/x11vnc/connections.c:2739: warning: unused parameter 'client'
    In file included from x11/x11vnc.c:38:
    x11/x11vnc/sslhelper.c: In function 'accept_openssl':
    x11/x11vnc/sslhelper.c:1897: warning: the address of 'rcookie' will always evaluate as 'true'
    In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:41,
    from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30,
    from x11/x11vnc/macosxCG.c:13,
    from x11/x11vnc.c:42:
    /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h: At top level:
    /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:267: error: conflicting types for 'Cursor'
    /usr/local/include/X11/X.h:108: error: previous declaration of 'Cursor' was here
    /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:298: error: conflicting types for 'Picture'
    /usr/include/X11/extensions/render.h:31: error: previous declaration of 'Picture' was here
    In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:104,
    from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8,
    from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
    from x11/x11vnc/macosxCG.c:14,
    from x11/x11vnc.c:42:
    /usr/include/objc/objc.h:43: error: conflicting types for 'BOOL'
    /usr/local/include/X11/Xmd.h:165: error: previous declaration of 'BOOL' was here
    In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8,
    from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
    from x11/x11vnc/macosxCG.c:14,
    from x11/x11vnc.c:42:
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:180: error: stray '@' in program
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:180: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NSString'
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:182: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:183: error: expected ')' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:185: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:186: error: expected ')' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:188: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:189: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:193: error: expected ')' before '*' token
    /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:194: error: expected ')' before '*' token
    In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:6,
    from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5,
    from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10,
    from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
    from x11/x11vnc/macosxCG.c:14,
    from x11/x11vnc.c:42:
    /System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:8: error: stray '@' in program
    /System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NSString'
    /System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:16: error: expected declaration specifiers or '...' before 'NSString'
    /System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    ...


    oh and there are no "#import" on my projects
    Last edited by rickrvo; 13th September 2011 at 18:19.

  9. #8
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    It seems x11/x11vnc/macosxCG.c includes mac-specific Obj-C headers at least.
    And, as per log, x11/x11vnc/macosxCG.c is included in another .c file. It's strange a little
    Here's an example:
    In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:6,
    from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5,
    from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10,
    from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
    from x11/x11vnc/macosxCG.c:14,
    from x11/x11vnc.c:42:
    /System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:8: error: stray '@' in program
    I would say x11/x11vnc/macosxCG.c includes <Cocoa.h> at line 14.
    Are you familiar with x11/x11vnc/macosxCG.c source?

  10. The following user says thank you to llev for this useful post:

    rickrvo (13th September 2011)

  11. #9
    Join Date
    Dec 2010
    Posts
    71
    Thanks
    26
    Platforms
    Windows

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    hum not really... but probably the app needs it ( since it is a vnc controlling application )

    that file is from another set of opensource project files that does the vnc communication, I think...

  12. #10
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    Well.. I'm not familiar with vnc port. Not sure.
    You could check contents of x11/x11vnc/macosxCG.c as well as x11/x11vnc.c to determine whether the port supports Carbon API.
    Actually Mac provides two major APIs: Carbon and Cocoa.
    Cocoa is modern object-oriented API written mostly in Objective-C++
    Carbon is older API written in plain C.
    Usually ports support both API and selection is done by defining some macro (something like USE_COCOA) or by customizing .pro file.
    Try to search those two .c files for COCOA or CARBON words in #ifdefs.
    Maybe .pro file of the port should be customized.
    Or maybe configuration script of the port can accept some command-line parameter which turns Carbon support on.
    Wish you luck

  13. The following user says thank you to llev for this useful post:

    rickrvo (14th September 2011)

  14. #11
    Join Date
    Dec 2010
    Posts
    71
    Thanks
    26
    Platforms
    Windows

    Default Re: thousands of system/library/frameworks errors of declaration for parameters... (M

    thanks! I'll try to take it from here. I'll post here if/when I discover the problem

Similar Threads

  1. Add thousands of item to QListWidget
    By daarsh in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2011, 09:39
  2. Using Mac Frameworks in Qt App
    By yogeshgokul in forum Qt Programming
    Replies: 16
    Last Post: 10th February 2008, 04:15
  3. int to QString with thousands separator
    By klaus1111 in forum Newbie
    Replies: 6
    Last Post: 6th January 2006, 22:06

Tags for this Thread

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.