User forums > Using Code::Blocks

Info about lib finder

<< < (3/4) > >>

byo:
Wow, someone digged out my old plugin.
But I must confess to one thing: One of reasons I've created this plugin for was to somehow force C::B team to create something like Library database inside C::B.
Idea is easy: inside project optinos you don't have to set lot's of includes, lot's of libs, defines etc. You just select libraries to be used from list (and maybe set some basic options) and it works (all configuration is known by C::B inside Library database and Libfinder automatically searches for them and adds into database, o) and use standard compile options to configure project, not libraries. It would even make all projects cross platform (IDE would know how to include library inside project so no need to put it into cbp file). And automatically adding library into cbp file (something that was also discussed in this topic) could be done really easy with such system (just find what #include <> are used and find what library uses it, register and done).
Unfortunately this feature could not be created as plugin for some reasons (it does affect build process) or I don't know how this could be done easily.

Ok, few words about library finder:
Last time I've tested library finder plugin (wow, something like year ago) C::B changed some things inside build process and some problems occured. I've found out that extra includes and libraries can not be added through CXX flags, and since C::B does not support multiple include dirs this plugin may be useless in many cases. (F.ex. when using wxwidgets, you have to put multiple include dirs into cbp files just like in case of standard configuration so why to use lib finder it anyway). I think that this plugin will still have to wait :(

Game_Ender:
Sounds  like Takeshi Miya's pkg-config plugin.  It already maintains the database for you.

takeshimiya:
I want to note that the plugin I was making was nice but not essencial, since you can already use pkg-config, and edit the .pc files by hand.

For those in Windows, pkg-config already compiled can be obtained here:
http://www.gimp.org/~tml/gimp/win32/pkg-config-0.20.zip
http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip
http://www.gimp.org/~tml/gimp/win32/gettext-0.14.5.zip
ftp://ftp.gtk.org/pub/glib/2.12/win32/glib-2.12.1.zip

I could create instructions of how to use it if anyone is interested, altrough it's very easy.

MortenMacFly:

--- Quote from: byo on October 11, 2006, 12:39:32 am ---Wow, someone digged out my old plugin.

--- End quote ---
That was me. :oops:
In fact I can't remember the source were I had found it but I knew it must have been done by Thomas and/or you. Anyway: I've "maintained" it during the time because at work I found it to be useful. I don't understand why you are saying the the WX setup will not work, because it actually works...?1 (Maybe I have something pre-configured that makes it work?!).
Anyway: I had a chat with Thomas and I think it's a nice work anyway... maybe not complete but I wouldn't keep it away from public. I'm not sure if it's worth distributing with C::B but definitley for "reading" as it has nice aspects of "what can be done" and for further development.
With regards, Morten.

tiwag:

--- Quote from: MortenMacFly on October 10, 2006, 01:28:55 pm ---...From my experience this cannot be automated: You will receive a lot of same exports from different libs or even the same libs but in different version (version number and e.g. debug/release ansi/unicode version etc...) So what lib to add is the question. ...

--- End quote ---
that's exactly the point,

i had some troubles because an imported dev-cpp project seemed to be compiling and linking ok, but didn't work as expected.

the reason was, that the dev-cpp project added (i guess by default) a long long long list of (unneccessary) libs to the linker,
and it happened, that a specific function was exported from more than one library and my app didn't work as expected,
because the wrong lib was choosen by the linker.

my conclusion: it is bad behaviour to add all possibe libs - it is good behaviour to add only these libs which are actually needed.
with c++ name-mangling the problem isn't there, but with C function names it can happen ...

sometimes it is necessary to look somewhat deeper on what's happening behind the scene  :lol:

brgds, tiwag

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version