*** GMX Spamverdacht *** Re: [PD] readanysf~ windows
Olaf Matthes
olaf.matthes at gmx.de
Mon Aug 9 14:38:48 CEST 2004
Okay, thanks, this solves the flext compile problem. Now I'm getting a
lot of errors ("error C2872: 'whatever' : ambiguous symbol" in some VC++
includes) when trying to compile readanysf~, so maybe I should stick to
plain C code... ;-)
Olaf
Thomas Grill wrote:
>Hi Olaf,
>it seems i haven't compiled with MSVC6 for some time. It has a rather
>old-fashioned STL implementation, but i introduces a workaround. Please find
>the attached file (which will be in CVS by tomorrow).
>Max compilation (for threaded flext versions) with MSVC6 suffers from the
>fact that the compiler provides rather old Windows SDK headers - it might
>not work.
>There's also another more subtle problem... here with MSVC6, math.h wants to
>be included with C++ linkage, therefore it has to be included before the
>"extern "C"" section in flstdc.h, which can easily be done.
>
>best greetings,
>Thomas
>
>
>----- Original Message -----
>From: "Olaf Matthes" <olaf.matthes at gmx.de>
>To: "Thomas Grill" <gr at grrrr.org>
>Cc: "smoerk" <smoerk at gmx.de>; "pd" <pd-list at iem.kug.ac.at>
>Sent: Monday, August 09, 2004 12:41 PM
>Subject: *** GMX Spamverdacht *** Re: [PD] readanysf~ windows
>
>
>
>
>>Thomas Grill wrote:
>>
>>
>>
>>>Hi Olaf,
>>>since i often compile flext a few times a day i'm very much wondering
>>>
>>>
>about
>
>
>>>the source of this error.
>>>Which compiler, version etc. are you using?
>>>
>>>
>>>
>>MSVC++ 6.0, pd 0.37-3, flext 0.4.6 (just downloaded from your site
>>again). Tried both Flext for Pd and Max/MSP...
>>
>>Olaf
>>
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>/*
>>
>>flext - C++ layer for Max/MSP and pd (pure data) externals
>>
>>Copyright (c) 2001-2004 Thomas Grill (xovo at gmx.net)
>>For information on usage and redistribution, and for a DISCLAIMER OF ALL
>>WARRANTIES, see the file, "license.txt," in this distribution.
>>
>>*/
>>
>>/*! \file flmap.h
>> \brief special map class for all 32-bit key/value-pairs
>>*/
>>
>>#ifndef __FLMAP_H
>>#define __FLMAP_H
>>
>>#include <map>
>>
>>/*! \defgroup FLEXT_SUPPORT Flext support classes
>> @{
>>*/
>>
>>//! Base class for maps
>>class AnyMap:
>> public std::map<unsigned int,unsigned int>
>>{
>> typedef std::map<unsigned int,unsigned int> Parent;
>>public:
>> AnyMap();
>> ~AnyMap();
>> iterator find(unsigned int k);
>> unsigned int &operator [](unsigned int k);
>>
>> typedef std::pair<unsigned int,unsigned int> pair;
>>};
>>
>>//! Specialized map class for any 32-bit key/value types
>>template <class K,class T>
>>class DataMap:
>> public AnyMap
>>{
>>public:
>> class iterator:
>> public AnyMap::iterator
>> {
>> 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<AnyMap::iterator &>(*this) = it; }
>>#else
>> iterator(AnyMap::iterator &it): AnyMap::iterator(it) {}
>>#endif
>>
>> inline K &key() const { return *(K *)&((*this)->first); }
>> inline T &data() const { return *(T *)&((*this)->second); }
>> };
>>
>> class pair:
>> public AnyMap::pair
>> {
>> public:
>> inline K &key() const { return *(K *)&first; }
>> inline T &data() const { return *(T *)&second; }
>> };
>>
>> inline iterator find(K k) { return AnyMap::find(*(unsigned int *)&k); }
>> inline T &operator [](K k) { return *(T *)&(AnyMap::operator [](*(unsigned int *)&k)); }
>> inline void erase(K k) { AnyMap::erase(*(unsigned int *)&k); }
>>};
>>
>>//! @} // FLEXT_SUPPORT
>>
>>#endif
>>
>>
More information about the Pd-list
mailing list