Im trying to build a PortMidi example in Mingw but it depends on two libraries portmidi and winmm, I recompiled portmidi to get a portimidi.a but Im getting errors of missing code.
Is posible to link winmm to mingw, and I have to use ".a" or ".lib" libraries?
Im using this command to compile the source:
g++ -o prg latency.c -IHeaders -LLib -lportmidi -lwinmm
Thanks for your help.
You don't need winmm.a to build latency.c
you need
libpmjni.dll.a
,libportmidi.dll.a
orlibportmidi_s.a
To build portmidi wit CMake takes 5 minutes.
Then you can compile it with the following command.
Building portmidi with CMake
cmake-gui.exe
unzip portmidi to the folder
c:\minGW\src\portmidi217
you can see in the next image(replace all
T:\
withC:\
of course)press configure
settings as described --> click next
settings as described --> click ok
there a errors so click configure again
next looks better click configure again
settings as described Release or Debug
maybe it worked without
c:\msys\1.0\bin\sh.exe
click configure again
looks good --> click
Generate
cd to your just builded
c:\minGW\portmidi
open windows command type make
it takes a short time to build
there they are :
.a and .dll
.a
toc:\minGW\lib
.dll
toc:\minGW\bin
C:\minGW\src\portmidi217\pm_common
andC:\minGW\src\portmidi217\porttime
all .h to the folder where your
latency.c
is.Then you can
latency.c
compile as described above, you just need to adjust the paths.