#26 Mac OS X linker fails

0.2.4
closed-fixed
nobody
None
5
2014-02-19
2014-01-07
r-lind
No

Make on Mac OS X fails with:

libtool: link: gcc -dynamiclib -o .libs/libWildMidi.1.dylib .libs/libWildMidi_la-wm_error.o .libs/libWildMidi_la-file_io.o .libs/libWildMidi_la-reverb.o .libs/libWildMidi_la-lock.o .libs/libWildMidi_la-gus_pat.o .libs/libWildMidi_la-wildmidi_lib.o -lm -lc -install_name /usr/local/lib/libWildMidi.1.dylib -compatibility_version 2 -current_version 2.2 -Wl,-single_module -Wl,-exported_symbols_list,.libs/libWildMidi-symbols.expsym
duplicate symbol _WM_SampleRate in:
.libs/libWildMidi_la-gus_pat.o
.libs/libWildMidi_la-wildmidi_lib.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libWildMidi.la] Error 1

WM_SampleRate is used in both src/gus_pat.c and src/wildmidi_lib.c

Discussion

  • Ozkan Sezer

    Ozkan Sezer - 2014-01-10

    I use the following patch to fix that problem. (Although I gave up on using wildmidi a long time ago..)

    Index: include/common.h

    --- include/common.h (revision 151)
    +++ include/common.h (working copy)
    @@ -56,7 +56,7 @@
    };

    -unsigned short int WM_SampleRate;
    +extern unsigned short int WM_SampleRate;

    struct _sample {
    unsigned long int data_length;
    Index: src/wildmidi_lib.c
    ===================================================================
    --- src/wildmidi_lib.c (revision 151)
    +++ src/wildmidi_lib.c (working copy)
    @@ -69,6 +69,8 @@

    static char WM_Version[] = "WildMidi Processing Library " PACKAGE_VERSION;

    +unsigned short int WM_SampleRate;
    +
    struct _patch *patch[128];

    float reverb_room_width = 16.875;

     
  • bret curtis

    bret curtis - 2014-02-19
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks