Re: Link kernel module with a library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, 15. January 2002 03:36, kernelnewbies-bounce@nl.linux.org wrote:
> Von:  Michael Zhu <mylinuxk@yahoo.ca>@nl.linux.org am 14.01.2002 21:36 EST
>
> Hello,everyone, can I link a kernel module with a
> library? In my module I need to call the functions
> exported from a .a library. I couldn't link that
> library with my module. I know it is possible to link
> two .o files in one module. But how to build a module
> with one .a file and one .o file. Can anyone give me a
> hand on this? Thanks in advance.
Yep, here's a snip of my Makefile:
---------snip-----------
lib.o: stpc_vip.o gdk/gdk.a
	$(LD) -r $^ -o $@
	mv lib.o stpc_vip.o
-------snip-------------

1. compile your module
2. link it with your lib
3. move the name to yourmodule.o

Hope that helps,

Franz
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux