Here's some good documentation how shared libs work on linux:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.htmlIt's not like on windows that the application-path of the binary is automatically searched for shared libraries. If you want to do something similar you have to set a rpath on linking. In c::b you could set that in "Other linker options". I suppose the following should do something close to the way it works on windows:
-Wl,-rpath -Wl,.
But if you do that it's probably nicer to put the shared libs in some subfolder, like:
-Wl,-rpath -Wl,./my_shared_libs
This has also some disadvantages as the rpath works relative to your working-directory and not to your application-directory. Usually that's fixed by adding a startupscript which must be called instead of the binary which makes sure to set the working-directory (checkout googleearth, they have a nice script which will do that and I think it's GPL so you can copy it).
This works for developing. For releasing it to others it would also work, but many prefer to set LD_LIBRARY_PATH instead in the shellscript which is used to start the binary. I don't know why, probably because that way users can change that easily.
I'm not sure if there is a way to avoid rpath and instead set LD_LIBRARY_PATH before application start within C::B. If anyone knows how to do that an example would be nice.