| This is a solution that works across all platforms. It depends on the
packaging and the installers implementing it. Currently I don't even
know whether the Linux distros support doubles (Fedora does not). In
fact, OSX is the only platform that allows for both versions to exist
concomitantly (and for this reason it's important to have a solution).
The current problem is that it is very easy for a front-end or plugin
developer to link to doubles and forget to add -DUSE_DOUBLE and end up
with code that does not work with weird error messages. It's very
unsatisfactory. By implementing this solution, you can keep on
defining USE_DOUBLE, but if you don't define it, the doubles version
will also compile because the float-version.h will contain
#ifndef USE_DOUBLE
#define USE_DOUBLE
#endif
Victor
On 28 Jul 2010, at 19:46, Steven Yi wrote:
> Well I think I'd like to see a solution that works across the various
> OS's. I wouldn't want to have a program that is compiling against OSX
> have to do something different than on Linux or OSX. Currently with
> use_double we can use that in the same way across the board.
>
> On 7/28/10, Victor Lazzarini wrote:
>> If you install the headers in two different locations (as in OSX),
>> then both versions can coexist peacefully. Note that this is for
>> installation purposes only and not for Csound core development.
>> Also, if it does not suit an install system, it can be left alone.
>> For
>> OSX, it just works very well.
>>
>> In linux if headers are installed in
>>
>> /usr/local/include/csound
>>
>> we could envisage the double being installed in
>>
>> /usr/local/include/csound64
>>
>> or something like that.
>>
>> Victor
>>
>> On 28 Jul 2010, at 19:08, Steven Yi wrote:
>>
>>> Hi Victor,
>>>
>>> Won't doing this mean one will not be able to compile both a float
>>> and
>>> a double lib on the same system? I see how this will set a default
>>> for
>>> an installation but I don't see exactly where it allows overriding.
>>>
>>> Thanks!
>>> steven
>>>
>>>
>>>
>>> On Wed, Jul 28, 2010 at 11:13 AM, Victor Lazzarini
>>> wrote:
>>>> I have a system to help API and plugin developers to build binaries
>>>> for either floats or doubles csound. It goes like this:
>>>>
>>>>
>>>> 1. in sysdep.h I include the header "float-version.h"
>>>>
>>>> 2. float-version.h is a minimal header that can define USE_DOUBLE
>>>> or not
>>>>
>>>> 3. The installation for doubles version of csound will install
>>>> float-
>>>> version.h with USE_DOUBLE defined
>>>>
>>>> 4. The installation for floats will have a blank float-version.h
>>>>
>>>> 5. I have placed a file called float-version-double.h with
>>>> USE_DOUBLE
>>>> defined in H/ which can be used by installers to be installed as
>>>> float-
>>>> version.h
>>>>
>>>> I am testing this in OSX with SConstruct copying float-version-
>>>> double.h as float-version.h to the CsoundLib64.framework. It works
>>>> well for building Loris opcodes, just by selecting the different
>>>> set
>>>> of headers from the different frameworks.
>>>>
>>>> On other systems, installers can be implemented to do a similar
>>>> operation.
>>>>
>>>> If everyone agrees to this, I can commit it.
>>>>
>>>> Victor
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> The Palm PDK Hot Apps Program offers developers who use the
>>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a
>>>> share
>>>> of $1 Million in cash or HP Products. Visit us here for more
>>>> details:
>>>> http://p.sf.net/sfu/dev2dev-palm
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The Palm PDK Hot Apps Program offers developers who use the
>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a
>>> share
>>> of $1 Million in cash or HP Products. Visit us here for more
>>> details:
>>> http://p.sf.net/sfu/dev2dev-palm
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> The Palm PDK Hot Apps Program offers developers who use the
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> of $1 Million in cash or HP Products. Visit us here for more details:
>> http://p.sf.net/sfu/dev2dev-palm
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> --
> Sent from my mobile device
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |