Making Librarys in Minix3 - Minix
This is a discussion on Making Librarys in Minix3 - Minix ; Hi all,
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 ...
-
Making Librarys in Minix3
Hi all,
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-libr...OWTO/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
-
Re: Making Librarys in Minix3
All,
> 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
-
Re: Making Librarys in Minix3
Ben Gras schreef:
> All,
>
> > 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
-
Re: Making Librarys in Minix3
> 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
jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit
-
Re: Making Librarys in Minix3
Smit de JF schreef:
>
>
> > 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
> jfdsmit@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
-
Re: Making Librarys in Minix3
I've got everything working now, gar is located in /usr/gnu/bin/gar
Using this path i was able to follow up the howto. Thanks for helping
me out!
Bram