Adding a custom library to l4/pkg/bootstrap

Masti Ramya Jayaram rmasti at
Wed Sep 3 09:51:09 CEST 2014

Hey Jan,

Sorry for underspecifying it. Here are the details.

I have a library called scc-sec under the l4/pkg directory. It has one file:

a. init.c that contains 

void hello(){

I compile this as a library and I can see the and scc-sec.a in the l4/build/pkg/scc-sec directory

Now in l4/pkg/bootstrap:

a. Control file
requires: (added) scc-sec

b. Make.rules:


I declare the function as:

extern "C" {
void hello();

and somewhere in startup() function, I call it


On trying to compile this, I get (exact error as it is compiled)

in undefined reference to function "hello()"

I do not think it is the printf because it explicitly gives me an undefined reference to hello :)

Thanks in advance for helping with this,

From: l4-hackers [l4-hackers-bounces at] on behalf of Jan Bierbaum [jan.bierbaum at]
Sent: 02 September 2014 21:56
To: l4-hackers at
Subject: Re: Adding a custom library to l4/pkg/bootstrap

On 02.09.2014 13:32, Masti Ramya Jayaram wrote:
> 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).
Could you give the *exact* error message? BTW, this is something you
should always do if you want people to be able to help you ;-)

My guess at this point would be that the undefined reference is not your
'hello' function but 'printf'...

> 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.
The function declaration is not the problem here. If it was, the
compiler would give you an error along the lines of "'hello' was not
declared in this scope".

Regards, Jan

l4-hackers mailing list
l4-hackers at

More information about the l4-hackers mailing list