Commit d15fb6e4 authored by thomas's avatar thomas
Browse files

fix for Max SDK 6.1

git-svn-id: https://svn.grrrr.org/ext/trunk/flext@3786 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 4c94f760
# where are the Max/MSP SDK header files?
# you should have the latest version!
# for now, please use MaxSDK-5.?.?, avoid MaxSDK-6.?.?
# you can run your externals with Max 6 nevertheless
MAXSDKPATH=/Applications/MaxMSP\ 4.6/MaxMSP-SDK/c74support
###############################################################
......@@ -61,6 +63,7 @@ UFLAGS += -ffast-math -mmacosx-version-min=10.4
LDFLAGS += -mmacosx-version-min=10.4
# user defined optimization flags
# for now, don't use -O3 !(Max will hang)
OFLAGS += -Os # -ftree-vectorize
# user defined debugging flags
......@@ -75,8 +78,8 @@ UFLAGS_i386 += -mmmx -msse -msse2 -msse3 -mtune=nocona
OFLAGS_i386 +=
DFLAGS_i386 +=
# cross-compilation (optional)
ARCH=ppc i386 #x86_64 ppc64
# list of architectures to build
ARCH=i386 #ppc x86_64 ppc64
# SDK for 10.4
#OSXSDK=/Developer/SDKs/MacOSX10.4u.sdk
#
# flext - C++ layer for Max/MSP and pd (pure data) externals
#
# Copyright (c) 2001-2012 Thomas Grill (gr@grrrr.org)
# Copyright (c) 2001-2013 Thomas Grill (gr@grrrr.org)
#
# $LastChangedRevision$
# $LastChangedDate$
......
flext - C++ layer for Max/MSP and Pd (Pure Data) externals
Copyright (c) 2001-2012 Thomas Grill (gr@grrrr.org)
Copyright (c) 2001-2013 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
......
......@@ -138,6 +138,7 @@ AddMethod(IX,"bang",FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with either no, list or anything arguments
#define FLEXT_ADDMETHOD(IX,M_FUN) \
\
AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
/*! \brief Add a handler for a method with a (variable argument) list
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2009 Thomas Grill (gr@grrrr.org)
Copyright (c) 2001-2013 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
......@@ -290,7 +290,12 @@ void flext_root::post(const char *fmt, ...)
char buf[1024];
vsnprintf(buf,sizeof buf,fmt, ap);
buf[sizeof buf-1] = 0; // in case of full buffer
#if FLEXT_SYS == FLEXT_SYS_MAX && C74_MAX_SDK_VERSION >= 0x0500
::object_post(NULL,buf);
#else
::post(buf);
#endif
va_end(ap);
}
......@@ -304,7 +309,16 @@ void flext_root::error(const char *fmt,...)
STD::strcpy(buf,"error: ");
vsnprintf(buf+7,sizeof buf-7,fmt, ap);
buf[sizeof buf-1] = 0; // in case of full buffer
#if FLEXT_SYS == FLEXT_SYS_MAX
#if C74_MAX_SDK_VERSION >= 0x0500
::object_error(NULL,buf);
#else
::error(buf);
#endif
#else
::post(buf);
#endif
va_end(ap);
}
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2010 Thomas Grill (gr@grrrr.org)
Copyright (c) 2001-2013 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
......@@ -25,6 +25,12 @@ $LastChangedBy$
#include "flpushns.h"
#if C74_MAX_SDK_VERSION >= 0x0610
// really bad: post and error are #defines in Max SDK >= 610
#undef post
#undef error
#endif
/*! \defgroup FLEXT_SUPPORT Flext support classes
@{
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment