Hi Mariano

> CFLAGS="-m32" \
> CXXFLAGS="-m32" \
> CPPFLAGS="-m32 -I/opendbx/PostgreSQL/9.0/include 
> -I/opendbx/mysql/5.0/include" \
> LDFLAGS="-m32 -L/opendbx/PostgreSQL/9.0/lib -L/opendbx/mysql/5.0/lib" \
> ./configure --disable-utils --with-backends="mysql pgsql"
>
> Now...let's say I have renamed /opendbx to /dbx
> what should happen?  should openDBX file while trying to get the library?
> is it linked statically or it can be searched dinamically?
> Why we ask this?  because we want to distribute an Smalltalk app for new
> comers/newbiews where we include the binary of OpenDBX. But if this is
> statically linked to the database client library then we cannot do it.

If you move the database drivers (located in /opendbx during compile 
time) to another directory (like /dbx), the drivers are not found any 
more if you don't help the libopendbx.so library to find them. The 
reason for this is, that most OS don't support searching for libraries 
relative to the configured paths, e.g. if /usr/lib is the standard path, 
then /usr/lib/opendbx/libmysqlbackend.so is not found if you tell the 
library to look for opendbx/libmysqlbackend.so. There are currently two 
ways to get around this:

1.) During compile time, the absolute path where the backends can be 
found is included into libopendbx.so. Thus, if you move them to another 
directory, lookup fails without further hints
2.) You can use an absolute or relative path to the backend for the 
"backend" parameter, e.g. instead of "mysql" use 
"../../backends/libmysqlbackend.so"

> The second question was to know if this depends on the OS and if true if you
> know which is the case in linux/mac/windows. I don't know why, but if I
> remember correctly, in Windows I was able to do this. I mean, the dll of the
> database client library was search dinamically in those places where Windows
> searchs...

Windows is an exception in this case because it allows relative paths 
for searching backends. It's the first case where I'm thinking that 
Windows is doing better than Unix in this area :-)


Norbert

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
libopendbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to