>
> This is a standard C++ problem. Some platforms need string.h, and some
> just string. We have not figured out a way to make this work on all
> platforms.
>
> Any ideas? We kept switching them back and forth until we realized
> this. Sun's seem to have the problem.
>
Why not just add an extra thing into the config scripts. Something like:
echo '#include <string.h>' > test.c
echo 'int main(int argc,char **argv) {' >> test.c
Something here where you have a clash...
echo 'return 1;}' >> test.c
$CC test.c -o test
if [ -f test ]
then
echo '#define NEED_STRING_H' >> someheader.h
else
echo '#include <string.h>' > test.c
echo 'int main(int argc,char **argv) {' >> test.c
Something here where you have a clash...
echo 'return 1;}' >> test.c
$CC test.c -o test
if [ -f test ]
then
echo '#define NEED_STRING' >> someheader.h
else
echo '#define UNKNOWN_STRING' >> soneheader.h
fi
fi
and then in your main program files
#include "someheader.h"
#ifdef NEED_STRING
#include <string>
#endif
#ifdef NEED_STRING_H
#include <string.h>
#endif
This is how I test for things like that. OK so I wrote all of my config stuff
before I knew about gnu's autoconf, and to be honest I dont know how well
this would integrate with that, but it works for me to compile my own
projects on just about any un*x flavor Ive been able to get access
too, plus cygwin32
~Michael