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

[Xen-users] Mini-OS library linking

  • To: xen-users <xen-users@xxxxxxxxxxxxx>
  • From: Adrian Shaw <axs911@xxxxxxxxxxxxx>
  • Date: Fri, 10 Aug 2012 19:19:22 +0100
  • Delivery-date: Fri, 10 Aug 2012 18:21:03 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hi all,

I'm trying to cross compile a library so it can be used in a Mini-OS C-stubdomain.

I have added the necessary rules to the stubdom Makefile to compile my library.
The resulting static library file (.a file) I've placed with the other static libraries like libm.a, libc.a, libz.a, libnosys.a etc (they are all in a directory called stubdom/cross-root-x86_64/x86_64(something)/lib/
I have also copied my library header file into the Mini-OS include directory in extras/mini-os/include.

However, I am finding it very hard to find where to specify the linking to my static library.
In my main.c file in stubdom/c I keep getting undefined reference errors.

Please tell me if I'm going about this the wrong way. 
I was just going by how the other libraries seem to have been compiled in.
What are the few things I need to have in place for me to use functions in main.c?

I'm aware that this might be a daft question, but the makefile isn't clear to me.



PS: I also tried to add my .a static library into the APP_OBJS in the c-stubdom rule, but it didn't work (complaining about no rule for that target - why should I need one?)

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.