Hello,
When I try to build the app below in Genode, the following linking error happens:
main.o: In function `main':
…/main.cc:6: undefined reference to `malloc(unsigned int)'
…/main.cc:8: undefined reference to `free(void*)'
What am I missing here? Thanks!
Amadeo
::::::::::::::
main.cc
::::::::::::::
#include <stdlib.h>
#define N 10
int main(void) {
int *v = (int *) malloc(N*sizeof(int));
for (int i=0; i<N; i++) v[i] = i;
free(v);
}
::::::::::::::
target.mk
::::::::::::::
TARGET = foo
SRC_CC = main.cc
LIBS = cxx env mini_c