Michel Onoff wrote
> In the end the problem was… but the locations that Pharo searches for
> libraries. Putting the library there or using a full path solved the
> problem for my 64 ibt Pharo 6.1/macOS Mojave installation.
Great! Thanks for posting the solution :)
-
Cheers,
Sean
--
Sent fro
On 2018-10-18 05:31, Pierce Ng wrote:
> On Wed, Oct 17, 2018 at 10:08:58AM +0200, Michel Onoff wrote:
>> Specifically, I'm trying to build on all supported platforms, namely macOS,
>> Windows and Linux. Currently I've got Linux and Windows under control, but I
>> cannot find a systematic way to bui
On Wed, Oct 17, 2018 at 10:08:58AM +0200, Michel Onoff wrote:
> Specifically, I'm trying to build on all supported platforms, namely macOS,
> Windows and Linux. Currently I've got Linux and Windows under control, but I
> cannot find a systematic way to build on macOS.
When I last tried either on Y
yes exactly There is for Unix (which includes macos and linux)
UnixDynamicLoader >>loadLibrary: filename flag: flag
^ self ffiCall: #(void *dlopen(const char *filename, int flag))
while for windows is
WindowsDynamicLoader>>loadLibrary: lpFileName
^ self ffiCall: #(void *LoadLibrary(String
Afaik, dlopen(3), which I presume UFFI uses internally to load (shared)
libraries on demand (I cannot imagine anything else), looks in
LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS), not in PATH.
So let's focus on one of my question again, reworded here:
What is the strategy that UFFI internal
yeah I apologise for the wrong example , LibC utilises the
enviroment/system variables.
Generally speaking all OSes have a PATH variable that defines the places
where common libraries and tools are to be found. If you are on windows you
can type in the command prompt , "PATH", in Linux and MacOS i
Hi Dimitris,
thanks for the long explanation.
As you can see from my example, I build the library with the
-undefined dynamic_lookup
flag to clang, so this should be compatible with your (3) option if I
understand you correctly. Compiling/linking this way should allow the
use of dlopen(3)
I advice first of all the use of CMake , you can thank me later.
CMake if you are not aware is the standard build system for C/C++ , it
makes it super easy to build and compile projects so you dont have to do
what you are doing, call the compiler and pass the inifite amount of
compiler flags that