For a school project i'm trying to do some programming in Minix.
Standard C programs all work well, so i try to make it more dificult
and build a library that contains some basic functionality. For this
i've used an Howto i found on the internet.
http://www.dwheeler.com/program-library/Program-Library-HOWTO/x287.html
This is an howto on writing libraries for linux. So i knew i would
encounter some problems. But as i couldn't find good alternatives i
thought i might give it a try.
The problem i encounter at this moment are related to the archiver ar.
In the file script_static the library is archived using the following
line:
ar rcs libhello-static.a libhello-static.o
Running this in MINIX3 gives an error. The 's' parameter is not
supported. Leaving it out also give me the following error:
./libhello-static.a: file not recognized : File format not recognized
What can i do to fix / work around this problem?
I also would like to know if there is a howto avalible on this subject?
If so, i haven't found it (yet).
Thanks in advance!
Kind Regards,
Bram Jezeer
> Running this in MINIX3 gives an error. The 's' parameter is not
> supported. Leaving it out also give me the following error:
> ./libhello-static.a: file not recognized : File format not recognized
>
> What can i do to fix / work around this problem?
>
> I also would like to know if there is a howto avalible on this subject?
> If so, i haven't found it (yet).
Chances are you are mixing ack and gcc. gcc was ported, but the object
code and archive format are incompatible with ack.
To make ack libraries (archives), use ar. To make gcc libraries, use
gar.
=Ben
Thanks for your awnser.
I'm trying to make a library using the archiver ar, as mentuoned above,
this however fails.
What about gar, i couldn't find any information about it on the minix
website or the internet at all. Is gar correct?
Bram
> Thanks for your awnser.
> I'm trying to make a library using the archiver ar, as mentuoned above,
> this however fails.
> What about gar, i couldn't find any information about it on the minix
> website or the internet at all. Is gar correct?
Are you using ack or gcc to compile your source files? It is important
that you use the corresponding archiver for your object files. If you are
compiling using ack you should make your libraries using ar, if you are
compiling your source files using gcc you should use gar to make your
libraries. gcc and ack use a different file format for their object files
(as well as their binaries) so mixing the two is not an option.
Regards,
Jens
--
Jens de Smit
Student Computer Science | Vrije Universiteit Amsterdam
jfd...@few.vu.nl | http://www.few.vu.nl/~jfdsmit
Thanks for your answer,
I'm using gcc to compile my source code. I' would like to use gar but
am unable to find it. How can i use it? Do i have to install it after a
clean installation?
Regards,
Bram
Bram