PortMIDI (macosx)

BlitzMax Forums/BlitzMax Programming/PortMIDI (macosx)

Nigel Brown(Posted 2006) [#1]
Just trying to get the portmidi code to compile under macosx using a macbook pro (first mac attempt).

Strict

Import "portmidi/porttime/*.h"
Import "portmidi/porttime/porttime.c"

Import "portmidi/pm_common/*.h"
Import "portmidi/pm_common/portmidi.c"

?MacOS

    Import "portmidi/porttime/ptmacosx_mach.c"

    Import "portmidi/pm_mac/*.h"
    Import "portmidi/pm_mac/pmmacosxcm.c"
    Import "portmidi/pm_mac/pmmac.c"

?



at the linking stage I get a bunch of errors:
ld: Undefined symbols:
_AudioConvertHostTimeToNanos
_AudioConvertNanosToHostTime
...

anyone have some mac experience to solve this?


skidracer(Posted 2006) [#2]
you need to work out what framework those functions are in, in freeaudio i needed the following coreaudio linkage:

Import "-framework AudioUnit"
Import "-framework AudioToolbox"


there's a CoreAudio and a CoreMidi framework and others, theres probably mention of the ones you require somewhere in the portmidi source I would imagine.


Nigel Brown(Posted 2006) [#3]
skidracer, thank you. This works!
Import "-framework CoreMIDI"
Import "-framework CoreAudio"