You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the note in the readme which advises to add -L$(pwd) as a linker flag to avoid this error, but I am still getting it. (I'm on macos)
My project structure is essentially:
TESTAPP/
lib/
libui/
src/
When I try to do a crystal build, it reports no errors, and generates an executable ./TESTAPP, but hen I try to run it I get the "library not loaded" error
Here's the first of the output of otool -L ./TESTAPP:
./TESTAPP:
@rpath/libui.A.dylib (compatibility version 0.0.0, current version 0.0.0)
...<< other libraries that are found >>
This problem may have something to do with my installation set up, because I have installed libui through homebrew, and my path is non standard. However, I have LD_LIBRARY_PATH and DYLD_LIBRARY_PATH set up to handle this, and it works with other libraries, but I could have missed something common.
I can get the program to run fine by running the command:
Which manually changes it to the explicit value of the dynamic library. But, I have to do this on each crystal build and I'd rather not have a Makefile to automate this and just use crystal's system directly.
Any help would be much appreciated!
The text was updated successfully, but these errors were encountered:
I had the same issue, and I fixed it by installing libui.
# Clone the https://github.com/andlabs/libui repo and cd into it.
$ mkdir build
$ cd build
$ cmake .. -DBUILD_SHARED_LIBS=OFF
$ make
$ sudo cp -a ./out/. /usr/local/lib/
Hello,
I see the note in the readme which advises to add
-L$(pwd)
as a linker flag to avoid this error, but I am still getting it. (I'm on macos)My project structure is essentially:
When I try to do a
crystal build
, it reports no errors, and generates an executable./TESTAPP
, but hen I try to run it I get the "library not loaded" errorHere's the first of the output of
otool -L ./TESTAPP
:This problem may have something to do with my installation set up, because I have installed libui through homebrew, and my path is non standard. However, I have LD_LIBRARY_PATH and DYLD_LIBRARY_PATH set up to handle this, and it works with other libraries, but I could have missed something common.
I can get the program to run fine by running the command:
install_name_tool -change "@rpath/libui.A.dylib" "/Users/cadebrown/programs/homebrew/lib/libui.dylib" ./TESTAPP
Which manually changes it to the explicit value of the dynamic library. But, I have to do this on each
crystal build
and I'd rather not have a Makefile to automate this and just use crystal's system directly.Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: