I did upgrade my Ubuntu from 11.04 to 11.10. In 11.04 all this worked fine:
gcc -fopenmp -g -c -o test.o test.c -I../include
gcc -fopenmp -g -o test test.o -lnuma -lm -L../myLib -lmyL
but now, in 11.10, it gives the following errors:
../myLib/libmyL.a (get.o): In function 'get':
get.c:(.text+0xa5): undefined reference to `mbind'
Where mbind is http://www.kernel.org/doc/man-pages/online/pages/man2/mbind.2.html
Plz can you help me to solve this problem? Or at least tell me what went wrong? Thanks.
Move -lnuma
to after your library in the link line this will help solve the dependency - because when you have it on the link line first the linker drops it because it doesn't need it as far as it knows so far.
Oh and in answer to your possible follow up question, yes you can create circular dependencies and No the they are not fun to fix :-)