coin-or / Cbc.old

This is a mirror of the subversion repository on COIN-OR
https://projects.coin-or.org/Cbc
Other
89 stars 30 forks source link

[Trac #88] Missing important documentation #111

Open s-c-e opened 5 years ago

s-c-e commented 5 years ago

Hello, I would like to use the CBC C++ API, and if I try to compile the example code, I get tons of undefined references errors. When I have tried to look for some info what to link to, I haven't found anything. Since there are quite a few libs installed if I compile CBC on Linux, some info regarding this seems quite important for me. Maybe even an autoconf macro and/or pkg-config file would come in handy... Regards, Matej

====

tkr

We are working as we speak on providing pkg-config files. At the moment, there a few different ways to easily see what the dependencies are, depending on your platform. If you want to post your question to the mailing list with specific details, we will be able to quickly point you in the right direction.

===

bubla

pkg-config support is good, but you already support libtool (you provide .la files), which is superior to pkg-config. If you add library dependencies to LIBADD in your Makefile.am, it should be OK. Like

library liba depends on libb

liba_LIBADD = libb

more info also here: http://sources.redhat.com/automake/automake.html#Libtool-Flags

will result in libb mentioned in the liba.la file, so if the user links to liba, libb (and its dependencies) will be linked to as well.

You probably know your build system better then me, so I am not sending you a patch, but I should be able to figure it out and send one eventually if you can't do it or if you don't have time.

BTW I have solved the issue by looking how the examples are built. And I also think that it is better if things are more visible to the people - either here in the public tracker, or in the wiki. Mailing lists are usually not that accessible.

Regards, Matej.

=====

tkr

Thanks for the feedback. We are in the midst of an overhaul of our build system, so I would be curious to have your input, since you seem to have knowledge of libtool, pkg-config, etc. If you would be willing to discuss this further over e-mail, please contact me off-line.

=====

bubla

Right, I am responsible for the DevIL's build system, so may be able to help you. Autotools are the best build system for C/C++ if they are used right. I would write you an email, but I don't know it...

=====

tkr

This is the project manager for Cbc, Ted Ralphs (ted lehigh edu).