[PD] linking libs with pd-lib-builder (was Re: fluid~)

Lucas Cordiviola lucarda27 at hotmail.com
Tue Jan 5 02:53:53 CET 2021


> I get an error
>
> -lc -l:libfluidsynth.2.3.5.dylib -Wl,-R
>
> ld: library not found for -l:libfluidsynth.2.3.5.dylib
>
> clang: *error: *linker command failed with exit code 1 (use -v to see 
> invocation)

The.dylib file is in the same dir as the .c file?

can you try:

-l:libfluidsynth.2.3.5.dylib -Wl,-rpath,"./"


> export LD_RUN_PATH="." in the makefile?
> tried it and it builds, but still get the error
> Library not loaded: /usr/local/opt/fluid-synth/lib/libfluidsynth.2.dylib
>   Referenced from: /Users/porres/Downloads/fluid~/fluid~.d_fat

hmm, not sure as I'd never done it.


> can you try with windows at least?

I have it working:

image1


I tweecked rhe makefile:

~~~~~~~~~

class.sources = fluid~.c

define forWindows

cflags += -I../fs-sources/include
ldlibs += -L../fs-sources/lib


endef

~~~~~~~


"fs-sources" conains the extracted package for win64 from 
https://github.com/FluidSynth/fluidsynth/releases/tag/v2.1.6 
<https://github.com/FluidSynth/fluidsynth/releases/tag/v2.1.6>


the fluid~ external folder has all these dlls:

fluid~.dll

libgobject-2.0-0.dll
libgthread-2.0-0.dll
libinstpatch-2.dll
libintl-8.dll
libsndfile-1.dll
libfluidsynth-2.dll
libglib-2.0-0.dll


Mensaje telepatico asistido por maquinas.

On 1/4/2021 10:24 PM, Alexandre Torres Porres wrote:
>
>
> Em seg., 4 de jan. de 2021 às 21:31, Lucas Cordiviola 
> <lucarda27 at hotmail.com <mailto:lucarda27 at hotmail.com>> escreveu:
>
>     Reading here the 3th section:
>
>     https://homepages.inf.ed.ac.uk/imurray2/compnotes/library_linking.txt
>     <https://homepages.inf.ed.ac.uk/imurray2/compnotes/library_linking.txt>
>
>     you can probably also try option:
>
>     export LD_RUN_PATH="."
>
>     in the makefile?
>
>
> tried it and it builds, but still get the error
>
> Library not loaded: /usr/local/opt/fluid-synth/lib/libfluidsynth.2.dylib
>   Referenced from: /Users/porres/Downloads/fluid~/fluid~.d_fat
>
>     I think this is necessary for Linux and macOS. On Windows it will
>     auto work if the object and the lib are in the same dir.
>
>
> can you try with windows at least?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210104/54b4c00f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image1.png
Type: image/png
Size: 7523 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210104/54b4c00f/attachment.png>


More information about the Pd-list mailing list