M_PI and M8E not defined

Bug reports (if you don't/won't have a Github account)
Post Reply
joaopa
Member
Posts: 46
Joined: Sat Mar 15, 2014 5:42 pm

M_PI and M8E not defined

Post by joaopa »

Always when trying to compile eigenmath

M_PI et M_E are not defined with using the 64_support
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

joaopa wrote:Always when trying to compile eigenmath
M_PI et M_E are not defined with using the 64_support
The new c library is using a different floating point math implementation called math48 (the classic c lib's is called genmath) so all the code and related headers are new. The headers have been following the C11 standard with some unix extensions.

Those macros are not part of the C11 standard but are an XSI extension (see http://pubs.opengroup.org/onlinepubs/00 ... ath.h.html ) but it makes sense to add them in. I will try to do it before tonight's build.
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

I should maybe add that the new c library is completely separate from the classic c library.

It has its own set of header files in z88dk/include/_DEVELOPMENT/sdcc (and /sccz80 but I think sdcc version is generally easier to read)
http://z88dk.cvs.sourceforge.net/viewvc ... MENT/sdcc/

It has its own code base in:
z88dk/libsrc/_DEVELOPMENT

All information related to targets is in:
z88dk/libsrc/_DEVELOPMENT/target
with cpm, embedded, zx being currently supported
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

The macros are now defined in the June 17 build.

Only the math.h header files are affected so you may find it easier just to copy the new ones over the old ones:

z88dk/include/_DEVELOPMENT/sdcc/math.h :
http://z88dk.cvs.sourceforge.net/viewvc ... xt%2Fplain

z88dk/include/_DEVELOPMENT/sccz80/math.h
http://z88dk.cvs.sourceforge.net/viewvc ... xt%2Fplain

z88dk/include/_DEVELOPMENT/proto/math.h
http://z88dk.cvs.sourceforge.net/viewvc ... xt%2Fplain
joaopa
Member
Posts: 46
Joined: Sat Mar 15, 2014 5:42 pm

Post by joaopa »

Thanks. it is fixed in current nighty build.
Post Reply