Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22307

Using library paths in makefiles

$
0
0

I have written a makefile like this:

HEADER = -I./cygdrive/c/cpros/kajj/source4
LIBB = -L./cygdrive/c/cpros/kajj/source1   -L./cygdrive/c/cpros/kajj/source2
LIBRA = -larith -ldekk

target : game.o 
    gcc $(HEADER)   $(LIBB)  $<  -o  $@  $(LIBRA)   

game.o : game.c 
    gcc -c  game.c

I have created my own static library and included the header file path and library path. When I execute my makefile it gives an error saying that /usr/lib/gcc cannot find -larith -ldekk.

It is pointing to the lib/ directory but it is not over there: -ldekk and -larith are in source1 and source2 files respectively.

How to solve this error?


Viewing all articles
Browse latest Browse all 22307

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>