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.aorlibportmidi_s.aTo build portmidi wit CMake takes 5 minutes.
Then you can compile it with the following command.
Building portmidi with CMake
cmake-gui.exeunzip portmidi to the folder
c:\minGW\src\portmidi217you 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.execlick configure again
looks good --> click
Generatecd to your just builded
c:\minGW\portmidiopen windows command type make
it takes a short time to build
there they are :
.a and .dll.atoc:\minGW\lib.dlltoc:\minGW\binC:\minGW\src\portmidi217\pm_commonandC:\minGW\src\portmidi217\porttimeall .h to the folder where your
latency.cis.Then you can
latency.ccompile as described above, you just need to adjust the paths.