Building OSLib under Linux
Tony van der Hoff
tony at mk-net.demon.co.uk
Tue Mar 30 10:14:01 BST 2004
On 28 Mar, in message <40674B6A.20104 at philipnet.com>, you wrote:
[snip]
>
> However, I now get:
> -bash-2.05b$ make -f GNUmakefile
> make -C Tools
> make[1]: Entering directory
> `/home/riscos/riscos/oslib/RO-OSLib/!OsLib/Tools'
> make -C BindHelp
> make[2]: Entering directory
> `/home/riscos/riscos/oslib/RO-OSLib/!OsLib/Tools/BindHelp'
> gcc -Wall -funsigned-char -I.. -I../support -DUNIX -DEXECUTE_ON_UNIX
> -D__swi -DTRACE=0 \
> -DDEBUG=0 -o BindHelp.o -c BindHelp.c
> BindHelp.c:179: `index' redeclared as different kind of symbol
> /usr/include/string.h:252: previous declaration of `index'
> BindHelp.c:179: warning: `index' was declared `extern' and later `static'
> make[2]: *** [BindHelp.o] Error 1
> make[2]: Leaving directory
> `/home/riscos/riscos/oslib/RO-OSLib/!OsLib/Tools/BindHelp'
> make[1]: *** [BindHelp] Error 2
> make[1]: Leaving directory
`/home/riscos/riscos/oslib/RO-OSLib/!OsLib/Tools'
> make: *** [Tools] Error 2
>
> Is that due to the version of gcc I'm running?
>
> -bash-2.05b$ gcc -v
> Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
>
That's useful feedback, thanks. I'm using gcc 3.2, and this error does not
occur, despite my string.h containing the "extern index" symbol. My guess is
that "string.h index" is aimed at the c++ standard library, so presumably it
should never have been considered, and I suppose they fixed it in the later
version.
Anyway, I see no reason to constrain users to this version of gcc, so I've
renamed the symbol. See how that goes...
I see you're calling "make -f GNUmakefile". It should be possible to juat
invoke "make", without the -f, as GNUmakefile is a default. Is that a
problem in your version of make?
Cheers, Tony
--
Tony van der Hoff
Buckinghamshire England
More information about the oslib-user
mailing list