From 0112dbebebb521254d2935fb4980a16bce97d32f Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 11 Aug 2004 04:04:25 +0000 Subject: "" svn path=/trunk/; revision=1937 --- externals/grill/flext/changes.txt | 2 ++ externals/grill/flext/config-max-msvc.txt | 2 +- externals/grill/flext/config-pd-darwin.txt | 2 +- externals/grill/flext/flext.cw | Bin 935395 -> 935395 bytes externals/grill/flext/readme.txt | 11 ++++++++++- externals/grill/flext/source/flbase.cpp | 9 +++++++-- externals/grill/flext/source/flmap.h | 5 +++-- externals/grill/flext/source/flstdc.h | 8 +++++--- externals/grill/flext/source/flsupport.cpp | 8 ++++++++ 9 files changed, 37 insertions(+), 10 deletions(-) diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index c664c2b2..5c47bc12 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -18,6 +18,8 @@ Version history: - added bool to usable types for creation arguments - protection for SIMD routines with count=0 - support exceptions for setup functions, object creation and destruction, method handling +- small fixes for MSVC6 incompatibilites +- fixes for Max 4.5 headers 0.4.6: - added a text edit window for list attributes diff --git a/externals/grill/flext/config-max-msvc.txt b/externals/grill/flext/config-max-msvc.txt index 312e1782..88fceca8 100644 --- a/externals/grill/flext/config-max-msvc.txt +++ b/externals/grill/flext/config-max-msvc.txt @@ -3,7 +3,7 @@ # # where is the Max SDK? -MAXSDKPATH=F:\prog\audio\MaxWinSDK\c74support +MAXSDKPATH="F:\prog\audio\maxmspsdk_win\4.5 headers\c74support" # where is MS VC++? # (should be commented out when called from the Visual Studio Command prompt) diff --git a/externals/grill/flext/config-pd-darwin.txt b/externals/grill/flext/config-pd-darwin.txt index 91e59edd..deece764 100644 --- a/externals/grill/flext/config-pd-darwin.txt +++ b/externals/grill/flext/config-pd-darwin.txt @@ -6,7 +6,7 @@ # CXX=g++-3.3 # where are the PD header files? (m_pd.h, m_imp.h, g_canvas.h) -PDPATH=/usr/src/pd-0.37-0/src +PDPATH=/usr/src/pd-0.37-4/src # where is the SndObj include directory? # (leave blank or comment out to disable SndObj support) diff --git a/externals/grill/flext/flext.cw b/externals/grill/flext/flext.cw index b2eddac3..87686b5c 100644 Binary files a/externals/grill/flext/flext.cw and b/externals/grill/flext/flext.cw differ diff --git a/externals/grill/flext/readme.txt b/externals/grill/flext/readme.txt index 3b01b00c..916ec74c 100644 --- a/externals/grill/flext/readme.txt +++ b/externals/grill/flext/readme.txt @@ -105,12 +105,21 @@ Max/MSP - MacOSX: ------------------ o Metrowerks CodeWarrior: edit & use the "flext.cw" project file +Be sure to have the latest Max/MSK SDK downloadable from http://www.cycling74.com +You should use "version 4.5 headers" rather than "version 4.3 headers". + You must have the following "Source Trees" (CW preferences, not project specific!) defined: "OS X Volume" - Pointing to your OSX boot drive "flext" - Pointing to the flext main directory -"Cycling74 OSX" - Pointing to the Cycling 74 SDK for xmax +"Cycling74 OSX" - Pointing to the SDK for Max/MSP - the path should end with /c74support "MP SDK" - Pointing to the Multiprocessing SDK (for threading support) +Note: Some parts of the Max/MSP SDK may not be compliant to the C standard. +If you get errors for lines like +#endif _MOTO_ +You should changes all of these to +#endif /* _MOTO_ */ + With your project using flext, be sure to define "FLEXT_SYS=1" - alternatively use the prefix file "flcwmax-x.h" or "flcwmax-x-thr.h" for threading support. diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp index 04bad89f..12e13fdf 100644 --- a/externals/grill/flext/source/flbase.cpp +++ b/externals/grill/flext/source/flbase.cpp @@ -2,7 +2,7 @@ flext - C++ layer for Max/MSP and pd (pure data) externals -Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net) +Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. @@ -135,7 +135,12 @@ bool flext_obj::GetParamSym(t_atom &dst,const t_symbol *sym,t_canvas *c) #if FLEXT_SYS == FLEXT_SYS_PD // this declaration is missing in m_pd.h (0.37-0 and -1) -extern "C" void canvas_getargs(int *argcp, t_atom **argvp); +// but it is there in 0.37-2 (but how to tell which micro-version?) +extern "C" +#ifdef _MSC_VER +__declspec(dllimport) +#endif +void canvas_getargs(int *argcp, t_atom **argvp); #endif diff --git a/externals/grill/flext/source/flmap.h b/externals/grill/flext/source/flmap.h index e93b5466..c20b5ade 100644 --- a/externals/grill/flext/source/flmap.h +++ b/externals/grill/flext/source/flmap.h @@ -48,9 +48,10 @@ public: iterator() {} #if defined(_MSC_VER) && (_MSC_VER < 0x1300) // with the MSVC6 STL implementation iterators can't be initialized... - iterator(AnyMap::iterator &it) { static_cast(*this) = it; } + iterator(AnyMap::iterator it) { static_cast(*this) = it; } #else - iterator(AnyMap::iterator &it): AnyMap::iterator(it) {} + // note: &it doesn't work for gcc (i don't know why it doesn't...) + iterator(AnyMap::iterator it): AnyMap::iterator(it) {} #endif inline K &key() const { return *(K *)&((*this)->first); } diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h index 92ea3fe8..5f503f1f 100644 --- a/externals/grill/flext/source/flstdc.h +++ b/externals/grill/flext/source/flstdc.h @@ -126,10 +126,12 @@ typedef t_int t_flint; typedef t_symbol *t_symtype; typedef t_object *t_thing; -#if FLEXT_OS == FLEXT_OS_WIN -typedef void *t_qelem; // qelem not defined in Windows SDK -#else +// for the following to work for Max for OSX you should have the latest SDK +#if FLEXT_OS == FLEXT_OS_MAC && !defined(MAC_VERSION) +// Max for OS9 SDK typedef qelem t_qelem; +#else +typedef void *t_qelem; #endif typedef method t_method; diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index abec1994..8aa12fb0 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -161,6 +161,8 @@ void *flext_root::operator new(size_t bytes) #if FLEXT_SYS == FLEXT_SYS_JMAX blk = (char *)::fts_malloc(bytes); +#elif defined(FLEXT_USECMEM) + blk = (char *)::malloc(bytes); #else blk = (char *)::getbytes(bytes); #endif @@ -194,6 +196,8 @@ void flext_root::operator delete(void *blk) #if FLEXT_SYS == FLEXT_SYS_JMAX ::fts_free(ori); +#elif defined(FLEXT_USECMEM) + ::free(ori); #else ::freebytes(ori,bytes); #endif @@ -222,6 +226,8 @@ void *flext_root::NewAligned(size_t bytes,int bitalign) #if FLEXT_SYS == FLEXT_SYS_JMAX blk = (char *)::fts_malloc(bytes); +#elif defined(FLEXT_USECMEM) + blk = (char *)::malloc(bytes); #else blk = (char *)::getbytes(bytes); #endif @@ -256,6 +262,8 @@ void flext_root::FreeAligned(void *blk) #if FLEXT_SYS == FLEXT_SYS_JMAX ::fts_free(ori); +#elif defined(FLEXT_USECMEM) + ::free(ori); #else ::freebytes(ori,bytes); #endif -- cgit v1.2.1