forum.alglib.net
http://forum.alglib.net/

Python library compile error
http://forum.alglib.net/viewtopic.php?f=2&t=1018
Page 1 of 1

Author:  AlexeyG [ Tue Oct 08, 2013 11:53 am ]
Post subject:  Python library compile error

Hello,

I'm interested in trying out some of the optimization algorithms provided with ALGLIB, but I'm having difficulties compiling the library.

I'm getting the following error for many different files:

Code:
In file included from basestat.h:25:0,
                 from basestat.c:22:
apserv.h:232:8: error: conflicting types for ‘log2’
double log2(double x, ae_state *_state);
        ^


While running the compilation script with the following options:
Code:
Detecting compiler properties
Compiler is 'gcc'
Parameters are ' -m64 -DAE_CPU=AE_INTEL -msse -O2'
stdint.h is found
Compiling...


I was wondering if anyone ran into this problem previously. And if so, how did you solve it? My guess is that log2 is defined somewhere in the standard include headers (say "math.h" included in aenv.h ?) and is redefined again by ALGLIB.

Cheers,
Alexey

Author:  Sergey.Bochkanov [ Wed Oct 09, 2013 8:11 am ]
Post subject:  Re: Python library compile error

You can just rename log2() to algliblog2() and search-and-replace all occurences of log2 by its new name :)

Author:  AlexeyG [ Wed Oct 09, 2013 11:19 am ]
Post subject:  Re: Python library compile error

Now it compiles without errors. Thanks!

Alexey

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/