Boost logo

Boost :

From: Manuel Fiorelli (manuel.fiorelli_at_[hidden])
Date: 2007-05-15 14:25:24


Hi,
when I tried to compile your example (in libs/algorithm/string/example/), I
got an error regarding the unavailability of the 'min' function.
I don't add your library to my source tree, instead I modified the #include
in the edit_distance_example.cpp;
Here is my gcc -v output
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-
1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)

I am not sure that it is either an error of your library or an error in how
I used it ...However, I "solved" the problem by editing your header as
follows:
1) insert at beginning #include <algorithm>
2) replace every reference to min with std::min

Best regards,
Manuel Fiorelli


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk