If you don't have round as a builtin the new 1.21.0 fails with a missing declaration.
(HAVE_DECL_ROUND false)
1.21.0 is missing the definition of round
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 4
- Joined: Wed Mar 23, 2005 11:59 am
Yes, 1.20.1 built correctly as it didn't use round, 1.21.0 now fails as round isn't defined.
make all-recursive
make[1]: Entering directory `/mnt/c1/src/zm-1.21.0'
Making all in src
make[2]: Entering directory `/mnt/c1/src/zm-1.21.0/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/local/include -g -O2 -MT zm_zone.o -MD -MP -MF ".deps/zm_zone.Tpo" -c -
o zm_zone.o zm_zone.cpp; \
then mv -f ".deps/zm_zone.Tpo" ".deps/zm_zone.Po"; else rm -f ".deps/zm_zone.Tpo"; exit 1; fi
In file included from zm_zone.h:25,
from zm_zone.cpp:22:
zm_box.h: In method `const Coord Box::Centre () const':
zm_box.h:60: `round' undeclared (first use this function)
zm_box.h:60: (Each undeclared identifier is reported only once for each
function it appears in.)
In file included from zm_zone.h:26,
from zm_zone.cpp:22:
zm_image.h: At top level:
zm_image.h:34: `double round (double)' used prior to declaration
make[2]: *** [zm_zone.o] Error 1
make[2]: Leaving directory `/mnt/c1/src/zm-1.21.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/c1/src/zm-1.21.0'
make: *** [all] Error 2
Linux 2.4.28 with gcc 2.96
make all-recursive
make[1]: Entering directory `/mnt/c1/src/zm-1.21.0'
Making all in src
make[2]: Entering directory `/mnt/c1/src/zm-1.21.0/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/local/include -g -O2 -MT zm_zone.o -MD -MP -MF ".deps/zm_zone.Tpo" -c -
o zm_zone.o zm_zone.cpp; \
then mv -f ".deps/zm_zone.Tpo" ".deps/zm_zone.Po"; else rm -f ".deps/zm_zone.Tpo"; exit 1; fi
In file included from zm_zone.h:25,
from zm_zone.cpp:22:
zm_box.h: In method `const Coord Box::Centre () const':
zm_box.h:60: `round' undeclared (first use this function)
zm_box.h:60: (Each undeclared identifier is reported only once for each
function it appears in.)
In file included from zm_zone.h:26,
from zm_zone.cpp:22:
zm_image.h: At top level:
zm_image.h:34: `double round (double)' used prior to declaration
make[2]: *** [zm_zone.o] Error 1
make[2]: Leaving directory `/mnt/c1/src/zm-1.21.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/c1/src/zm-1.21.0'
make: *** [all] Error 2
Linux 2.4.28 with gcc 2.96
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Thanks for that. Previous versions did use round but the header that defined it if it wasn't found is not included in zm_box.h.
To get round ( ) this you can edit zm.h and add the following lines
just under the line
To be safe you could also delete the lines
from zm_image.h as well, though I don't think it should cause a problem if you left them. Let me know how you get on. It's a little hard for me to test as I don't have access to a system which doesn't have it.
Phil
To get round ( ) this you can edit zm.h and add the following lines
Code: Select all
extern "C"
{
#if !HAVE_DECL_ROUND
double round(double);
#endif
}
Code: Select all
#include "zm_config.h"
Code: Select all
#if !HAVE_DECL_ROUND
double round(double);
#endif
Phil
-
- Posts: 4
- Joined: Wed Mar 23, 2005 11:59 am