dependencies - Making GNU Make locate the correct library dependency -


i've got simple makefile in 1 target depends on library:

test49: test49.c -lpthread 

the binary built using implicit rule turning .c file executable.

problem is, trying cross-compile, make interpreting -lpthread pointing /usr/lib/libpthread.so, quite incorrect. have defined path cross-compiler using cc=/path/to/bin/gcc, assume figure out -lpthread should somewhere in /path/to/lib, not.

you replace

test49: test49.c -lpthread 

with

test49: test49.c /path/to/lib/lpthread.so 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -