i'm struggling for a while with the following issue: I've created a static library file called "libabc.a". The main program and the include files are in different directorys, like /bin and /lib . Now I want to bind the main program with the static libray like this:
gcc -static myprogram.c -I/home/link/lib/ -L/home/link/lib -labc.a -o myprogram
So I always get the message, that the library couldn't be found in directory "/usr/bin/ld". What the hell, I'm telling the compiler that he has to use the directory given in -L and also mark that it's -static.
What is going on here? Actually it doesn't matter what's written behind -L , the linker simply ignores it. (Even if I write some gibberish behind -L)
Can anybody help me?
Thanks