I noticed this command:
gcc -Wall `libnet-config --defines` libnet-example-x.c -o libnet-example-x `libnet-config --libs`
What is the meaning of libnet-config --defines
and libnet-config --libs
?
I noticed this command:
gcc -Wall `libnet-config --defines` libnet-example-x.c -o libnet-example-x `libnet-config --libs`
What is the meaning of libnet-config --defines
and libnet-config --libs
?
It is executing a program that generates the necessary gcc arguments to compile an application that uses libnet.
Execute this at the command line and you will see what is going on:
libnet-config --defines
libnet-config
is an executable that will return a list of -D...
options for gcc when called with the argument --defines
and a list of -l...
with the other argument.