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

 

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to