0

I'm trying to use make, it returns these errors and simmilar ones :

usr/bin/ld: cannot find -lCbc
usr/bin/ld: cannot find -lCgl

I have already found similar issues, and tried a great deal of them. None was useful. for instance: https://stackoverflow.com/questions/16710047/usr-bin-ld-cannot-find-lnameofthelibrary

Details:
I am using ubuntu 16.04

I have installed some libraries like Vol and Cgl from coin-or:https://projects.coin-or.org/
libraries, executables and header files are installed in directories like "/home/MyPc/Descktop/CoinOrPaks/Vol-1.5.3/lib", "/home/MyPc/Descktop/CoinOrPaks/Vol-1.5.3/bin", "/home/MyPc/Descktop/CoinOrPaks/Vol-1.5.3/include" respectively.
My codes are stored in "home/MyPc/Descktop/NsProj/Sourcee"

Then I use

env PKG_CONFIG_PATH=/home/MyPc/Descktop/CoinOrPaks/Vol-1.5.3/lib/pkgconfig:
home/MyPc/Descktop/CoinOrPaks/Cgl-0.59.10/build/lib/pkgconfig cmake home/MyPc/Descktop/NsProj/Sourcee 


and give address of pkgconfig for non standard directories The above command executes OK. and says found messeges like: Found Cgl version 0.59.10
However after that when I use make...

and get those errors

2
  • Randomly applying "similar" solutions without understanding the problem is not going to help. You need to (1) find out in which directory the libCbc.* and libCgl.* are on your system (which you told us nothing about), and then (2) add the correct path to your cmake configuration (which you also told us nothing about, possibly it's not even calling pkgconfig).
    – dirkt
    Commented Dec 24, 2018 at 10:07
  • Please check (via ls) if the libraries in /home/MyPc/Descktop/CoinOrPaks/Vol-1.5.3/lib are static (.a) or (dynamic .so). For the latter, check if symlinks are present. You'll also need to read up on ldconfig to execute the resulting binary (once it comples). Invoke pkg-config manually, and check if it gives the correct library path for your two libraries ("found Cgl ..." may still point to some other package, you need to check the path, i.e. pkg-config -libs ...).
    – dirkt
    Commented Dec 24, 2018 at 11:38

1 Answer 1

1

It looks like you don't have the libraries libCbc, and libCgl, installed. You will need the dev versions of these libraries. e.g. libCbc-dev

apt install coinor-libCgl-dev coinor-libCbc-dev
3
  • I think they are installed correctly, as instructed in projects.coin-or.org/Vol
    – Reza_va
    Commented Dec 24, 2018 at 11:04
  • When you did ./configure, did you tell it where to find the libraries? Commented Dec 24, 2018 at 11:10
  • You need to tell it where your libraries are, else it will not find them. Do ./configure --help Commented Dec 24, 2018 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .