Open ghost opened 7 years ago
You mean...like this?
https://github.com/Fusion/libui.cr/blob/master/README.md#development
The instructions are already for OSX and Linux.
@kirbyfan64 This instruction is unclear
Sergiy,
What part of the instructions, specifically, do you find unclear? If you share with us where you are stuck, this will allow me to update the documentation accordingly.
@yenel The documentation on libui's page is fuzzy. The static linking in crystal didn't work (as I expected).
I haven't found an 'easy-way' of installing libui
on a fresh install of ubuntu.
The only way I've found is to download, build and install the libui
and libpcre
libraries.
The process (in my experience was/) is a bit tedious.
Here's a little script I wrote that more or less automates this process (tested on a fresh install of Ubuntu 17.04)
@tzekid I followed your script but it appears it has conflicts with the dependencies
/usr/bin/ld: warning: libpcre.so.3, needed by //lib/x86_64-linux-gnu/libglib-2.0.so.0, may conflict with libpcre.so.1
I'm using 16.04 btw
@nedpals Can you give out a bit more info please ? e.g. Did you get any errors / warnings whilst following the script ? How did you get the warning ? etc.
@tzekid Nevermind, it was just a warning. Works fine except on compiling it shows that warning. Btw your script is fine except when copying libraries. It throws an error having no "out" folder when copying libui.
@nedpals Ok. Thanks. Fixed it :)
on OSX I get the following:
% crystal build --link-flags "-L$(PWD)" src/examples/controlgallery/main.cr
ld: library not found for -lui
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: execution of command failed with code: 1: `cc -o "/Users/scott.pierce/git/libui.cr/main" "${@}" -L/Users/scott.pierce/git/libui.cr -rdynamic -lui -lpcre -lgc -lpthread /usr/local/Cellar/crystal-lang/0.22.0/src/ext/libcrystal.a -levent -liconv -ldl -L/usr/lib -L/usr/local/lib`
@ddrscott: Crystal doesn't recognize libui on your system. You need to build it.
You need to build it.
Not sure.
The ruby gem comes with the bindings for osx and windows so it just works there.
Perhaps a crystal shard could have the same and support it. Perhaps even on windows now? The above comment is ~5 years old so perhaps things improved a lot meanwhile.
Edit: For those unaware, I referred to kojix2' bindings in ruby here:
Hi Write more the process of running programs using the library libui.cr on linux (ubuntu)