I just compiled for 32 bit, and here the math functions are not available.
Did you compile for 32 bit using llvm_31?
This seems likely to be correct:
#if __WIN32 && !_WIN64
#define LLVM_MALLOC "llvm_malloc"
#define LLVM_FREE "llvm_free"
#else
#define LLVM_MALLOC "malloc"
#define LLVM_FREE "free"
#endif
On Wed, Jun 22, 2016 at 2:51 PM, Kjetil Matheussen <k.s.matheus...@gmail.com
> wrote:
> No, that test could fail. The important thing is whether llvm has fabsf,
> etc.
>
> Here is another attempt:
>
> http://users.notam02.no/~kjetism/diff2.diff
> <http://users.notam02.no/%7Ekjetism/generator.diff>
>
>
> (
> #if __WIN32 && defined(LLVM_31)
> #define LLVM_MALLOC "llvm_malloc"
> #define LLVM_FREE "llvm_free"
> #else
> #if __WIN32 && (defined(LLVM_32) || defined(LLVM_33) ||
> defined(LLVM_34) || defined(LLVM_35))
> #warning "We don't know whether LLVM_MALLOC should be defined as
> llvm_malloc or malloc. Defining as malloc."
> #endif
> #define LLVM_MALLOC "malloc"
> #define LLVM_FREE "free"
> #endif
> )
>
>
> On Tue, Jun 21, 2016 at 2:38 PM, Kjetil Matheussen <
> k.s.matheus...@gmail.com> wrote:
>
>> I guess the cause for this problem is that fabsf/etc. are defined as
>> macros (?).
>>
>> In case, how about this:
>>
>> #include <math.h>
>>
>> #ifdef fabsf
>> #define LLVM_MALLOC "llvm_malloc"
>> #define LLVM_FREE "llvm_free"
>> #else
>> #define LLVM_MALLOC "malloc"
>> #define LLVM_FREE "free"
>> #endif
>>
>>
>>
>>
>> On Tue, Jun 21, 2016 at 2:22 PM, Stéphane Letz <l...@grame.fr> wrote:
>>
>>> This was indeed required with (at least..) LLVM 3.1 and possibly some
>>> versions later on.
>>>
>>> If you can prepare a patch to deal with that this would be great.
>>>
>>> Thanks.
>>>
>>> Stéphane
>>>
>>> > Le 21 juin 2016 à 14:10, Kjetil Matheussen <k.s.matheus...@gmail.com>
>>> a écrit :
>>> >
>>> >
>>> > I'm compiling libfaust for windows, and have been strugging
>>> > a lot with the llvm_math stuff.
>>> >
>>> > Because of this code in llvm_dsp_aux.cpp:
>>> >
>>> > #ifdef _WIN32
>>> > #define LLVM_MALLOC "llvm_malloc"
>>> > #define LLVM_FREE "llvm_free"
>>> > #else
>>> > #define LLVM_MALLOC "malloc"
>>> > #define LLVM_FREE "free"
>>> > #endif
>>> >
>>> > I assumed that I had to compile the llvm_math.c file, and add the .ll
>>> > file as a "-l" argument when calling createDSPFactory.
>>> >
>>> > However, when I do that, faust crashes.
>>> >
>>> > However, when I don't do that, and change "#ifdef _WIN32" into "#if 0",
>>> > everything works.
>>> >
>>> > All the math functions are actually available (I've checked everyone),
>>> > so there was no need to link in llvm_math.
>>> >
>>> > I guess it would make sense to change that #ifdef into something
>>> > else. I'm using mingw 4.9.3 and LLVM 3.6.2. Perhaps it should be
>>> > changed to "#ifdef _MSC_VER"?
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>>> > Francisco, CA to explore cutting-edge tech and listen to tech
>>> luminaries
>>> > present their vision of the future. This family event has something for
>>> > everyone, including kids. Get more information and register today.
>>> >
>>> http://sdm.link/attshape_______________________________________________
>>> > Faudiostream-devel mailing list
>>> > Faudiostream-devel@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/faudiostream-devel
>>>
>>>
>>
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel