From: mgsloan <mg...@gm...> - 2007-07-26 21:32:46
|
Alright, I've fixed it again. The reason for these errors is that min/max only work when the types of both sides are the same. I guess your compiler is just a bit more of a stickler - ours appear to coerce. Anyway, it's definitely good to get these fixed. Could you fix them yourself and send a patch? Just look at the type signature given in the error (the warnings don't matter), and add a conversion operator in the code as required. For example, the most recent one was max(unsigned int, long unsigned int), so I added (unsigned) to the beginning of the second operand. Thanks, Michael Sloan On 7/26/07, Pajarico <paj...@gm...> wrote: > Ok, now I'm getting this: > > lxuser@localhost ~/compilation/lib2geom $ make > [ 3%] Generating svg_path_parser.cpp with ragel > Scanning dependencies of target 2geom > [ 7%] Building CXX object src/CMakeFiles/2geom.dir/svg-path.o > /home/lxuser/compilation/lib2geom/src/svg-path.h:39: warning: 'class > Geom::SVGPathSink' has virtual functions but non-virtual destructor > /home/lxuser/compilation/lib2geom/src/svg-path.h: In instantiation of > 'Geom::SVGPathGenerator<std::back_insert_iterator<std::vector<Geom::Path, > std::allocator<Geom::Path> > > >': > /home/lxuser/compilation/lib2geom/src/svg-path.h:106: instantiated from here > /home/lxuser/compilation/lib2geom/src/svg-path.h:54: warning: 'class > Geom::SVGPathGenerator<std::back_insert_iterator<std::vector<Geom::Path, > std::allocator<Geom::Path> > > >' has virtual functions but > non-virtual destructor > /home/lxuser/compilation/lib2geom/src/svg-path.h:106: warning: 'class > Geom::PathBuilder' has virtual functions but non-virtual destructor > [ 11%] Building CXX object src/CMakeFiles/2geom.dir/svg-path-parser.o > /home/lxuser/compilation/lib2geom/src/svg-path.h:39: warning: 'class > Geom::SVGPathSink' has virtual functions but non-virtual destructor > /home/lxuser/compilation/lib2geom/src/svg-path.h: In instantiation of > 'Geom::SVGPathGenerator<std::back_insert_iterator<std::vector<Geom::Path, > std::allocator<Geom::Path> > > >': > /home/lxuser/compilation/lib2geom/src/svg-path.h:106: instantiated from here > /home/lxuser/compilation/lib2geom/src/svg-path.h:54: warning: 'class > Geom::SVGPathGenerator<std::back_insert_iterator<std::vector<Geom::Path, > std::allocator<Geom::Path> > > >' has virtual functions but > non-virtual destructor > /home/lxuser/compilation/lib2geom/src/svg-path.h:106: warning: 'class > Geom::PathBuilder' has virtual functions but non-virtual destructor > [ 14%] Building CXX object src/CMakeFiles/2geom.dir/path.o > [ 18%] Building CXX object src/CMakeFiles/2geom.dir/poly.o > /home/lxuser/compilation/lib2geom/src/poly.h: In member function 'Poly > Poly::shifted(unsigned int) const': > /home/lxuser/compilation/lib2geom/src/poly.h:98: error: no matching > function for call to 'max(unsigned int, long unsigned int)' > make[2]: *** [src/CMakeFiles/2geom.dir/poly.o] Error 1 > make[1]: *** [src/CMakeFiles/2geom.dir/all] Error 2 > make: *** [all] Error 2 > > 2007/7/26, mgsloan <mg...@gm...>: > > I think the problem is that they don't have the same type. Probably > > our compilers figure out it needs to be cast to unsigned. I've > > attempted to fix it in svn, and reverted some of my old changes. > > > > Hope it works, > > Michael Sloan > > > > On 7/24/07, Pajarico <paj...@gm...> wrote: > > > First, thanks for your attention. Unfortunately I get the same error > > > (the only difference is that 'min' has been replaced by 'Min'). I did > > > a 'make clean' beforehand. > > > > > > About compiler/libs incompatibility, care to elaborate? Which libs > > > could be guilty? > > > > > > > > > > The issue is the error on min. The warnings are fine. > > > > > > > > This is likely due to some sort of compiler/libs incompatibility, > > > > though your list looks fine. This is probably why we used to have > > > > custom min/max. Anyway, I've re-added custom Min/Max to svn. Might > > > > as well, as it might help with compatibility in the future. > > > > > > > > Hope that fixes it, > > > > Michael Sloan > > > > > > > > On 7/22/07, Pajarico <paj...@gm...> wrote: > > > > > Hi, I get this error while compiling SVN, 0.1 also does this: > > > > > > > > > > lxuser@localhost ~/compilation/lib2geom $ make > > > > > [ 3%] Generating svg_path_parser.cpp with ragel > > > > > Scanning dependencies of target 2geom > > > > > [ 7%] Building CXX object src/CMakeFiles/2geom.dir/svg-path.o > > > > > /home/lxuser/compilation/lib2geom/src/sbasis.h: In function > > > > > 'Geom::SBasis Geom::truncate(const Geom::SBasis&, unsigned int)': > > > > > /home/lxuser/compilation/lib2geom/src/sbasis.h:215: error: no matching > > > > > function for call to 'min(unsigned int&, size_t)' > > > > > /home/lxuser/compilation/lib2geom/src/svg-path.h: At global scope: > > > > > /home/lxuser/compilation/lib2geom/src/svg-path.h:39: warning: 'class > > > > > Geom::SVGPathSink' has virtual functions but non-virtual destructor > > > > > /home/lxuser/compilation/lib2geom/src/svg-path.h: In instantiation of > > > > > 'Geom::SVGPathGenerator<std::back_insert_iterator<std::vector<Geom::Path, > > > > > std::allocator<Geom::Path> > > >': > > > > > /home/lxuser/compilation/lib2geom/src/svg-path.h:106: instantiated from here > > > > > /home/lxuser/compilation/lib2geom/src/svg-path.h:54: warning: 'class > > > > > Geom::SVGPathGenerator<std::back_insert_iterator<std::vector<Geom::Path, > > > > > std::allocator<Geom::Path> > > >' has virtual functions but > > > > > non-virtual destructor > > > > > /home/lxuser/compilation/lib2geom/src/svg-path.h:106: warning: 'class > > > > > Geom::PathBuilder' has virtual functions but non-virtual destructor > > > > > make[2]: *** [src/CMakeFiles/2geom.dir/svg-path.o] Error 1 > > > > > make[1]: *** [src/CMakeFiles/2geom.dir/all] Error 2 > > > > > make: *** [all] Error 2 > > > > > > > > > > > > > > > This is with: > > > > > - amd64 > > > > > - Gentoo Linux 2.6.20-r7 > > > > > - gcc-4.1.2 > > > > > - ragel-5.20 > > > > > - cmake-2.4 > > > > > > > > > > Cheers. > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by: Splunk Inc. > > > > > Still grepping through log files to find problems? Stop. > > > > > Now Search log events and configuration files using AJAX and a browser. > > > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > > _______________________________________________ > > > > > Lib2geom-devel mailing list > > > > > Lib...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/lib2geom-devel > > > > > > > > > > > > > > > |