Linux cc compliation of library in directory within project?

Posted by leeand00 on Stack Overflow See other posts from Stack Overflow or by leeand00
Published on 2010-04-12T17:28:28Z Indexed on 2010/04/12 17:33 UTC
Read the original article Hit count: 406

Filed under:
|
|
|
|

My directory structure looks like the following:

-xmllib
    -libxml++-1.0.a
-main.cc

..and I issue the command:

cc -lstdc++ -L./xmllib -llibxml++-1.0.a main.cc

But then it tells me that it can't find the binary for the library...even though I issued the command from the root directory.

/usr/bin/ld: cannot find -llibxml++-1.0.a main.cc
collect2: ld returned 1 exit status

Is there any reason why cc can't find the binary library?

I'm using cc version 2.96 (yes, it's old).

© Stack Overflow or respective owner

Related posts about cc

Related posts about gcc