Re: gplc libraries not found
Louis LSJ Krüger <[email protected]> Thu, 28 Apr 2022 23:43:44 +0200
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
Verbose output: ~/wrk/prolog/gprolog-1.5.0/examples/ExamplesPl$ gplc -v --fast-math --min-bips -o boyer boyer.pl -L /usr/lib64 -L libbips_fd.a Prolog compiler (GNU Prolog) 1.5.0 Copyright (C) 1999-2022 Daniel Diaz GNU Prolog comes with ABSOLUTELY NO WARRANTY. This is free software; see the source or the file named COPYING for copying conditions. Path used: /usr *** Compiling --- file: boyer.pl pl2wam --fast-math -o /tmp/gplcdlrUXb.wam boyer.pl wam2ma -o /tmp/gplcgwIELd.ma /tmp/gplcdlrUXb.wam delete /tmp/gplcdlrUXb.wam ma2asm -o /tmp/gplcjHZozf.s /tmp/gplcgwIELd.ma delete /tmp/gplcgwIELd.ma as --64 -o /tmp/gplcmSg9mh.o /tmp/gplcjHZozf.s delete /tmp/gplcjHZozf.s *** Linking cannot locate file libbips_fd.a deleting temporary files before exit delete /tmp/gplcmSg9mh.o delete /tmp/gplcmSg9mh.o How is this set/changed: "Path used: /usr" Regards. Louis. On 28/04/2022 23:20, Sean Charles (emacstheviking) wrote: try: /usr/doc/gprolog-1.5.0/examples/ExamplesPl$ gplc --fast-math --min-bips -o boyer boyer.pl -L /usr/lib64/libbips or: /usr/doc/gprolog-1.5.0/examples/ExamplesPl$ gplc --fast-math --min-bips -o boyer boyer.pl -L /usr/lib64/libbips /usr/doc/gprolog-1.5.0/examples/ExamplesPl$ gplc --fast-math --min-bips -o boyer boyer.pl -L /usr/lib64 -L -lbips I smell success with the second one... you are very close I think... keep tweaking! On 28 Apr 2022, at 22:17, Louis LSJ Krüger <[email protected] > wrote: I tried: /usr/doc/gprolog-1.5.0/examples/ExamplesPl$ gplc --fast-math --min-bips -o boyer boyer.pl -L /usr/lib64 and /usr/doc/gprolog-1.5.0/examples/ExamplesPl$ gplc --fast-math --min-bips -o boyer boyer.pl -L /usr/lib64/ and it still complains: "cannot locate file libbips_fd.a" The contents of that directory: ls -l /usr/lib64/libbi*.a -rw-r--r-- 1 root root 422490 Apr 26 20:34 /usr/lib64/libbips_fd.a -rw-r--r-- 1 root root 1756350 Apr 26 20:34 /usr/lib64/libbips_pl.a Regards. Louis On 28/04/2022 19:16, Sean Charles (emacstheviking) wrote: Try here: http://www.gprolog.org/manual/html_node/gprolog009.html section 4.4.3 using the compiler, Linker Options gplc --fast-math --min-bips -o boyer boyer.pl -L /path/to/lib It's been a while but I think I linked SDL2 like that, actually, here's a link to the code: https://github.com/emacstheviking/gnuprolog-libsdl2 Here's how I built my executable... gplc \ -C -I/Library/Frameworks/SDL2.framework/Headers \ -C -I/Library/Frameworks/SDL2_ttf.framework/Headers \ -C -I/Library/Frameworks/SDL2_mixer.framework/Headers \ -C -I/Library/Frameworks/SDL2_image.framework/Headers \ -L -framework SDL2 -L -framework SDL2_ttf -L -framework \ SDL2_image -L -framework SDL2_mixer -o sdltest \ sdl-ffi.pl sdl.pl sdl_lib.c sdl_thread.c sdl_ttf.c sdl_mixer.c Hope that helps, GNU Prolog is a sweet little thing! :D Sean On 28 Apr 2022, at 18:10, Louis LSJ Krüger <[email protected] > wrote: I decided to try the examples that comes with the source, but I get stuck: gplc --fast-math --min-bips -o boyer boyer.pl cannot locate file libbips_fd.a How do one ensure that the compiler find the libraries? I have them in /usr/lib64. I can't find a setting to tell the compiler where to look. Regards. Louis.