Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 11498  / 2 Years ago, fri, february 25, 2022, 2:14:29

I want to use make command and link it to the include and lib path.



I am using :



make -I /path_to_include  - L /path_to_lib


but it gives me:



nothing to be done for /path_to_lib


(The path is correct.)


More From » compiling

 Answers
0

make does not accept options like -L /path/to/somewhere - these are arguments that need to be given to the compiler and make will not pass them on. You probably need to edit the Makefile appropriately.



Depending on the Makefile, it will often use a variable like CFLAGS, LIBS or LDFLAGS to pass extra options to the compiler. You can set these when you run make: LIBS=-lmylib LDFLAGS=-L/path/to/mylib make. This relies on the Makefile having been written to use such variables however, which one generated by a system like autoconf probably will, but one written by hand may not.


[#27070] Saturday, February 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
scrubuz

Total Points: 194
Total Questions: 96
Total Answers: 127

Location: Monaco
Member since Fri, Sep 24, 2021
3 Years ago
;