Skip to content

Compilation errors for MaxObject.m and MacOSX10.6 SDK #25

Description

@jojocello

Hello,
I need to create a Max external to communicate with the Wacom tablet driver, which is written in Objective-C.
Unfortunately, I cannot compile the file MaxObject.m with the recommended platform (MacOSX10.6 SDK).
It seems that some Objective-C symbols of the SDK file runtime.h are marked UNAVAILABLE or deprecated.
I use clang and makefile, but the errors are identical when I load the Xcode project that you provide.
Does it exist a mean to fix this and produce the MaxObject framework ?
Below is my stack trace.
Thanks for your help.
jocelyn

==== Compile objectivemax file : source/core/ObjectiveMax/MaxAudioSignal.m ====
clang -arch x86_64 -isysroot 3rdparty/MacOSX10.6.sdk -mmacosx-version-min=10.6 -ObjC -Wall -Wno-unknown-pragmas -Werror -g -O3 -DDENORM_WANT_FIX=1 -DNO_TRANSLATION_SUPPORT=1 -DC74_NO_DEPRECATION
-DMAC_VERSION -DMAC_EXT_VERSION -Dpowerc -fvisibility=hidden
-I3rdparty/Max8.sdk/max-includes -I3rdparty/Max8.sdk/msp-includes -I3rdparty/Max8.sdk/jit-includes
-F3rdparty/Max8.sdk/max-includes -F3rdparty/Max8.sdk/msp-includes -F3rdparty/Max8.sdk/jit-includes
-include 3rdparty/Max8.sdk/max-includes/macho-prefix.pch -c source/core/ObjectiveMax/MaxAudioSignal.m -o source/core/ObjectiveMax/MaxAudioSignal.o
==== Compile objectivemax file : source/core/ObjectiveMax/MaxObject.m ====
clang -arch x86_64 -isysroot 3rdparty/MacOSX10.6.sdk -mmacosx-version-min=10.6 -ObjC -Wall -Wno-unknown-pragmas -Werror -g -O3 -DDENORM_WANT_FIX=1 -DNO_TRANSLATION_SUPPORT=1 -DC74_NO_DEPRECATION
-DMAC_VERSION -DMAC_EXT_VERSION -Dpowerc -fvisibility=hidden
-I3rdparty/Max8.sdk/max-includes -I3rdparty/Max8.sdk/msp-includes -I3rdparty/Max8.sdk/jit-includes
-F3rdparty/Max8.sdk/max-includes -F3rdparty/Max8.sdk/msp-includes -F3rdparty/Max8.sdk/jit-includes
-include 3rdparty/Max8.sdk/max-includes/macho-prefix.pch -c source/core/ObjectiveMax/MaxObject.m -o source/core/ObjectiveMax/MaxObject.o
source/core/ObjectiveMax/MaxObject.m:54:42: error: 'class_nextMethodList' is unavailable
struct objc_method_list *methodlist = class_nextMethodList(aClass, &iterator);
^
3rdparty/MacOSX10.6.sdk/usr/include/objc/runtime.h:493:38: note: 'class_nextMethodList' has been explicitly marked unavailable here
OBJC_EXPORT struct objc_method_list *class_nextMethodList(Class, void **) OBJC2_UNAVAILABLE;
^
source/core/ObjectiveMax/MaxObject.m:55:45: error: no member named 'ivars' in 'struct objc_class'
struct objc_ivar_list *varlist = aClass->ivars;
~~~~~~ ^
source/core/ObjectiveMax/MaxObject.m:59:27: error: incomplete definition of type 'struct objc_method_list'
for(i=0; i < methodlist->method_count; i++){
~~~~~~~~~~^
3rdparty/MacOSX10.6.sdk/usr/include/objc/runtime.h:460:8: note: forward declaration of 'struct objc_method_list'
struct objc_method_list;
^
source/core/ObjectiveMax/MaxObject.m:63:49: error: incomplete definition of type 'struct objc_method_list'
strncpy(methodname, (const char *)methodlist->method_list[i].method_name, 255);
~~~~~~~~~~^
3rdparty/MacOSX10.6.sdk/usr/include/secure/_string.h:109:37: note: expanded from macro 'strncpy'
? __builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))
^~~
3rdparty/MacOSX10.6.sdk/usr/include/objc/runtime.h:460:8: note: forward declaration of 'struct objc_method_list'
struct objc_method_list;
^
source/core/ObjectiveMax/MaxObject.m:63:49: error: incomplete definition of type 'struct objc_method_list'
strncpy(methodname, (const char *)methodlist->method_list[i].method_name, 255);
~~~~~~~~~~^
3rdparty/MacOSX10.6.sdk/usr/include/secure/_string.h:110:34: note: expanded from macro 'strncpy'
: __inline_strncpy_chk (dest, src, len))
^~~
3rdparty/MacOSX10.6.sdk/usr/include/objc/runtime.h:460:8: note: forward declaration of 'struct objc_method_list'
struct objc_method_list;
^
source/core/ObjectiveMax/MaxObject.m:122:17: error: 'class_nextMethodList' is unavailable
methodlist = class_nextMethodList(aClass, &iterator);
^
3rdparty/MacOSX10.6.sdk/usr/include/objc/runtime.h:493:38: note: 'class_nextMethodList' has been explicitly marked unavailable here
OBJC_EXPORT struct objc_method_list *class_nextMethodList(Class, void **) OBJC2_UNAVAILABLE;
^
source/core/ObjectiveMax/MaxObject.m:126:24: error: incomplete definition of type 'struct objc_ivar_list'
for(i=0; i < varlist->ivar_count; i++){
~~~~~~~^
source/core/ObjectiveMax/MaxObject.m:55:10: note: forward declaration of 'struct objc_ivar_list'
struct objc_ivar_list *varlist = aClass->ivars;
^
source/core/ObjectiveMax/MaxObject.m:127:35: error: incomplete definition of type 'struct objc_ivar_list'
struct objc_ivar var = varlist->ivar_list[i];
~~~~~~~^
source/core/ObjectiveMax/MaxObject.m:55:10: note: forward declaration of 'struct objc_ivar_list'
struct objc_ivar_list *varlist = aClass->ivars;
^
source/core/ObjectiveMax/MaxObject.m:127:22: error: variable has incomplete type 'struct objc_ivar'
struct objc_ivar var = varlist->ivar_list[i];
^
3rdparty/MacOSX10.6.sdk/usr/include/objc/runtime.h:42:16: note: forward declaration of 'struct objc_ivar'
typedef struct objc_ivar *Ivar;
^
source/core/ObjectiveMax/MaxObject.m:211:20: error: no member named 'super_class' in 'struct objc_class'
aClass = aClass->super_class;
~~~~~~ ^
source/core/ObjectiveMax/MaxObject.m:496:41: error: 'cString' is deprecated [-Werror,-Wdeprecated-declarations]
object_setInstanceVariable(self, [key cString], (void *)value);
^
3rdparty/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367:25: note: 'cString' has been explicitly
marked deprecated here

  • (const char *)cString DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER;
    ^
    3rdparty/MacOSX10.6.sdk/usr/include/AvailabilityMacros.h:477:62: note: expanded from macro 'DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER'
    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER DEPRECATED_ATTRIBUTE
    ^
    3rdparty/MacOSX10.6.sdk/usr/include/AvailabilityMacros.h:160:49: note: expanded from macro 'DEPRECATED_ATTRIBUTE'
    #define DEPRECATED_ATTRIBUTE attribute((deprecated))
    ^
    source/core/ObjectiveMax/MaxObject.m:512:41: error: 'cString' is deprecated [-Werror,-Wdeprecated-declarations]
    object_getInstanceVariable(self, [key cString], (void **)&value);
    ^
    3rdparty/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367:25: note: 'cString' has been explicitly
    marked deprecated here
  • (const char *)cString DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER;
    ^
    3rdparty/MacOSX10.6.sdk/usr/include/AvailabilityMacros.h:477:62: note: expanded from macro 'DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER'
    #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER DEPRECATED_ATTRIBUTE
    ^
    3rdparty/MacOSX10.6.sdk/usr/include/AvailabilityMacros.h:160:49: note: expanded from macro 'DEPRECATED_ATTRIBUTE'
    #define DEPRECATED_ATTRIBUTE attribute((deprecated))
    ^
    12 errors generated.
    make: *** [source/core/ObjectiveMax/MaxObject.o] Error 1-

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions