thanks, I tweaked a little libcc.fs and inserted add-libpath definition. By the way I discovered that the LIBRARY_PATH variable works also.
I try to setup simple ffi bindings for opengl & glfw c-library glfw \c #include <GL/glfw.h> s" glfw" add-lib s" /usr/local/lib" add-libpath c-function glfw-init glfwInit -- void c-function gflw-open-window glfwOpenWindow n n n n n n n n n -- n c-function glfw-get-window-param glfwGetWindowParam n -- n c-function glfw-swap-buffers glfwSwapBuffers -- void end-c-library but gforth crashes with a core dump (I let a trace in libcc.fs): @ gforth test-glfw.fs libtool --silent --tag=CC --mode=link gcc -module -rpath ~/.gforth/libcc-named/ ~/.gforth/libcc-named/glfw.lo -o ~/.gforth/libcc-named/glfw.la -L/usr/local/lib -lglfw Unable to find pthread_mutexattr_setkind_np versioned symbol. Aborting. Abort trap: 6. Memory fault(coredump) I don't know very much the process of loading share object in gforth but I observe that the file ~/.gforth/libcc-named/glfw.la is created On Fri, Apr 26, 2013 at 3:33 PM, Bernd Paysan <[email protected]> wrote: > Am Freitag, 26. April 2013, 15:12:51 schrieb Cyrille Duret: > > hello everybody, > > I am looking for a way to indicate the lib path of gcc while gforth is > > compiling a c-library > > > > I have tried export CFLAGS=-L/usr/local/lib but the linker still complain > > he not find my lib. > > > > I have seen in the last development version you have added the word > > add-libpath but for now it seems that this version is a bit buggy for > > freeBSD. > > Bug reports please! > > > Any solution for the 0.7.2 version ? > > : add-libpath ( c-addr1 u1 node -- c-addr2 u2 ) > \ append " -L<nodelib>" to string1 > >r s" -L" append r> c-lib-string 2@ append ; > > should do it for 0.7.2. > > -- > Bernd Paysan > "If you want it done right, you have to do it yourself" > http://bernd-paysan.de/ >
