New package linking fails

Masti Ramya Jayaram rmasti at inf.ethz.ch
Mon Sep 1 16:28:43 CEST 2014


Dear all,

I am trying to create a new package under l4/pkg. The linking of the package fails and it has to do with the linker path but I am not sure how to fix it. Here are the details.

Package structure: (relevant parts)

l4/pkg/test/server/src/main.cc
l4/pkg/test/server/src/folder1/test1.c
l4/pkg/test/include/test1.h

l4/pkg/test/server/src/Makefile

PKGDIR          ?= ../..
L4DIR           ?= $(PKGDIR)/../..

TARGET          = $(PKGNAME)

# list requirements of your program here
REQUIRES_LIBS   = libsigma0 libirq l4util l4re_c-util

# list your .c or .cc files here
SRC_C           = folder1/test1.c
SRC_CC          = main.cc

include $(L4DIR)/mk/prog.mk

The compilation of the package fails with an undefined reference in main.cc to a function in test1.c (defined through test1.h). All the object files are generated and I checked under build. What do you think is the issue?

Thanks,
ramya





More information about the l4-hackers mailing list