I just had a look at the static ELF libraries packaged and published
at http://www.riscos.info/packages. E.g. for the libpng one the
documentation says:
--8<--
To include in you C programs.
include "png.h"
and add the include flag
-I/LibPNG:/
Link with
-LLibPNG:o.libpng
--8<--
Actually with the binutils we're using in GCCSDK 4, we better follow the
rules & habits there, i.e.:
1) The library should be named libpng.a (i.e. ".a" extension) and I
propose not to swap suffixes so to have "libpng/a" on RISC OS disc.
The .o extension means object file and not a library file and although
this is supported in GCCSDK 3.4.6 we don't have this support in GCCSDK 4.
2) To link, specify a link search directory and -l to name the library, i.e.
-LLibPNG: -lpng
And to specify the include directory, you can use:
-ILibPNG:
There is no need for extra '/' slashes.
As a full example, this is supposed work:
gcc -ILibPNG: -IZLib1g: -o pngtest.o -c pngtest.c
gcc -o pngtest -LLibPNG: -lpng -LZLib1g: -lz pngtest.o
Could the people doing the library packaging take this info into account
and update the packaging script in 'setvars' & documentation please ?
Thanks,
John.
--
John Tytgat, in his comfy chair at home BASS
[EMAIL PROTECTED] ARM powered, RISC OS driven
_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK