Re: [LAD] Writing a library?

From: Emanuel Rumpf <xbran@email-addr-hidden>
Date: Wed Jul 23 2008 - 10:07:20 EEST

2008/7/23 Darren Landrum <darren.landrum@email-addr-hidden>:

> Now, I know about writing a good header file, and its associated class,
> and all that, but I have no knowledge of how to write it as a dynamic
> library.

it's about like this:
write a file with the functions inside
write a header file, define the functions as public
compile as PIC (position independent code)
link as shared library

C-example:
compile:
   gcc -c -fPIC -I/usr/include/ myfile.c
( creates myfile.o )
link:
  gcc -omyfile.so -shared myfile.o -L/usr/lib/ -lanydependancy
( creates myfile.so )

autoconf, automake etc. are old
If you wanted to, I'd suggest to use a more recent build tool (e.g.
scons, cmake, git, .. )
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Wed Jul 23 12:15:01 2008

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2008 - 12:15:01 EEST