Re: Using dinamic librarys

1999-10-18 Thread David Z. Maze
Micha Feigin <[EMAIL PROTECTED]> writes:
MF> How do I compile a program to use dinamic libraries (.so)?

By default any library you link against (with the -l switch to cc/ld)
is dynamically linked.  So, if you need to use libm.so, the standard
math library, you'd just use a command something like

cc -o foo myprogthatusessin.c -lm

-- 
David Maze [EMAIL PROTECTED]  http://donut.mit.edu/dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
-- Abra Mitchell


Using dinamic librarys

1999-10-18 Thread Micha Feigin
How do I compile a program to use dinamic libraries (.so)?
Thanx
[EMAIL PROTECTED]


Re: Compiling and using c librarys (.a and .so)

1999-10-17 Thread Greg Wooledge
Micha Feigin ([EMAIL PROTECTED]) wrote:

> How do I compile and use both static and dinamic libraries under linux?

Static:

  gcc -c foo.c
  gcc -c bar.c
  ar rv libfoo.a foo.o bar.o

Dynamic:

  gcc -c -fpic foo.c
  gcc -c -fpic bar.c
  gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 foo.o bar.o

You can also use GNU libtool if you're feeling brave.

> Any good tutorial on the subject?

Static libraries are standard -- any Unix development tutorial will work.

Dynamic libraries follow the ELF standards, so any document discussing
ELF should be a good starting point.  The LINUX-ELF HOWTO is great,
but it's kind of obsolete (*nobody's* using a.out any more), so it's
hard to find these days.  I used google and managed to turn up a copy
at .

-- 
Greg Wooledge| Distributed.NET http://www.distributed.net/
[EMAIL PROTECTED] | because a CPU is a terrible thing to waste.
http://www.kellnet.com/wooledge/ |


pgpP0RxLH379Y.pgp
Description: PGP signature


Compiling and using c librarys (.a and .so)

1999-10-17 Thread Micha Feigin
How do I compile and use both static and dinamic libraries under linux?
Any good tutorial on the subject?
Thanx
[EMAIL PROTECTED]


Re: Librarys

1998-02-12 Thread David Z. Maze

Pete Poff <[EMAIL PROTECTED]> writes:
PP> Can someone tell me what file I need off of ftp.debian.org that
PP> contains all the .h files like, types.h, and time.h?

libc[56]-dev

PP> Can someone also tell me what command to use to see how much
PP> space I have left?

df

-- 
 _
/ \  "The cat's been in the box for over
|  David Maze |  20 years.  Nobody's feeding it.  The
| [EMAIL PROTECTED]   |cat is dead."
| http://donut.mit.edu/dmaze/ |  -- Grant, on Schroedinger's Cat
\_/


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: Librarys

1998-02-12 Thread Alex Yukhimets
> Can someone tell me what file I need off of ftp.debian.org that
> contains all the .h files like, types.h, and time.h?  I need the ones that
> work with the gcc compiler.  I've downloaded gcc*.deb, gdb*c, and
> make*deb.  Can someone also tell me what command to use to see how much
> space I have left?
> 
> Thanks,
> Pete

Assuming you are using 'stable', get libc5-dev package.

Alex Y.


-- 
   _ 
 _( )_
( (o___   +---+
 |  _ 7   |Alexander Yukhimets|
  \(")|   http://pages.nyu.edu/~aqy6633/  |
  / \ \   +---+


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Librarys

1998-02-12 Thread Pete Poff
Can someone tell me what file I need off of ftp.debian.org that
contains all the .h files like, types.h, and time.h?  I need the ones that
work with the gcc compiler.  I've downloaded gcc*.deb, gdb*c, and
make*deb.  Can someone also tell me what command to use to see how much
space I have left?

Thanks,
Pete

Pete Poff
E-Mail Address: [EMAIL PROTECTED]
[EMAIL PROTECTED]


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .