Re: [anjuta-list] Dynamic library (.so)



Jens,

On Mon, Mar 14, 2016 at 4:48 PM, Igor Korot <ikorot01 gmail com> wrote:
Jens,

On Mon, Mar 14, 2016 at 4:32 PM, Jens Mühlenhoff <j muehlenhoff gmx de> wrote:
Am 14.03.2016 um 13:26 schrieb Igor Korot:

But what about my second question? IIUC, Anjuta will create .so file in:

<my_project>/Debug/<my_so_project>

And so, when I try to run the program and load the library, will it
fail? Or Anjuta will
add the library search path and the code will be executed?

If the code will fail - how do I tell Anjuta to produce the library in
the proper directory:

<my_project>/Debug/src?

Thank you.


The "proper" directory is actually "/usr/lib/" or "/usr/local/lib/" or whatever your --prefix is.

You usually ./configure && make && sudo make install the shared library (or use the equivalent Anjuta menu 
commands).

After that you can build your project that depends on the shared library in the same way.

So it's fundamentally different with what you would do for example on Windows.

I understand that, but during development time, I would very much
prefer not to keep writing to
/usr/lib or /usr/local/lib.

I'm still doing development, so why should I install something that
will be overwritten anyway?
Besides I can't run "make install" from Anjuta environment. "make
install" runs with "root"
privileges and I am running Anjuta from my regular user account.

Couldn't I somehow differentiate between "Debug" and "Release" build
of the software?

igor IgorDellGentoo ~/dbhandler $ find . -name *.so
./Debug/sqlite/.libs/libsqlite.so

igor IgorDellGentoo ~/dbhandler $ find . -name *.la
./Debug/sqlite/.libs/libsqlite.la
./Debug/sqlite/libsqlite.la

So if I want to debug my program I would copy the libsqlite.so where
the executable
binary is and run it, right?

Thank you.


Thank you.


--
Mit freundlichen Grüßen
Jens Mühlenhoff


_______________________________________________
anjuta-list mailing list
anjuta-list gnome org
https://mail.gnome.org/mailman/listinfo/anjuta-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]