RE: Adding a custom library to l4/pkg/bootstrap

"Masti Ramya Jayaram" <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Sorry about the multiple emails. I managed to get past the library not found error - it was a matter of nomenclature.  

However, now I am trying to call a function in the library through an included header file (which is part of the library) and it fails  (undefined reference).

My header file: init.h

#define BLAH 10
int abcd = 5;
int hello();

Code in my init.c

int hello(){
printf("Hello");
}

My C++ code:

extern "C"{
#include <l4/libscc-sec/init.h>
}

int main(){
printf("Vars from lib %x, %x", BLAH. abcd)
hello();
}

The program fails to compile with the calls to the function hello. If I remove hello, it compiles.

I made sure that I am indeed using the extern "C" directive. I also tried putting the function declaration in here instead of the header file itself but it does not help.

Thanks,
ramya
________________________________________
From: l4-hackers [[email protected]] on behalf of Masti  Ramya Jayaram [[email protected]]
Sent: 02 September 2014 11:37
To: [email protected]
Subject: Adding a custom library to l4/pkg/bootstrap

Hi all,

I have managed to compile a custom C library (libscc-sec) as part of the l4 packages. Now I would like to use it in the bootstrap package (make a call to a function in the library). I did the following:

a. Added the library as a requirement in pkg/bootstrap/Control

requires: drivers_uart drivers_of libc l4util cxx_io libscc-sec

b. Modified the pkg/bootstrap/server/src/Make.rules so that it also looks for libscc-sec by:

L4_LIBS          = -static -nostdlib $(DRV_LIBS) -lcxx_base -lcxx_io -llibscc-sec

But on compiling, I get an error that says that -llibscc-sec not found

The package is getting compiled and I can see the library libscc-sec.a in the build folder. What am I missing?

Thanks,
ramya


_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.