Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


It seems, I can use dylib tokens like
"@loader_path/libEngine12.dylib" in the string passed to dlopen.

I don't know. I don't find a reference online that says that dlopen
understands those tokens. Did you find some documentation that says it
does? I see it only referenced about dependent libraries.

I didn't find any documentation neither, but the following scenario proves,
that it works (patch set 15):
- Change dependency of isql's fbclient library:
install_name_tool -change
$(LO_ROOT)/Unpackedtarball/firebird/gen/Release/firebird/lib/libfbclient.dylib.3.0.0
$(LO_ROOT)/instdir/LibreofficeDev.app/Contents/Frameworks/libfbclient.dylib.3.0.0
path/to/isql
- run isql
- type: create database "hello.fdb";

The database is successfully created. I used isql for testing it.
With soffice, it does not work for some reason.

What we could conceptually do is something like:

 OUString sLibURL("$LO_LIB_DIR");
 ::rtl::Bootstrap::expandMacros(sLibURL);
 OUString sEnginePath;
 ::osl::FileBase::getSystemPathFromFileURL(sLibURL + "/libEngine12.dylib", sEnginePath);
 dlopen(OUStringToOString(sEnginePath, RTL_TEXTENCODING_UTF8).getStr());

But the expandMacros and getSystemPathFromFileURL has to be done from
libreoffice code, while the dlopen is done from firebird code... That
could be a difficulty... A somewhat hackish solution is that
libreoffice code sets some environmental variable (or ... horror of
horrors ... a global variable) that the firebird code reads. <shrug>

DYLD_LIBRARY_PATH could be defined. I'll try this way.

Tamás

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.