linker - trying to build a PortMidi example in Mingw -
im trying build portmidi example in mingw depends on 2 libraries portmidi , winmm, recompiled portmidi portimidi.a im getting errors of missing code.
is posible link winmm mingw, , have use ".a" or ".lib" libraries?
im using command compile source:
g++ -o prg latency.c -iheaders -llib -lportmidi -lwinmm
thanks help.
you don't need winmm.a build latency.c
you need
libpmjni.dll.a
, libportmidi.dll.a
or
libportmidi_s.a
to build portmidi wit cmake takes 5 minutes.
- portmidi source : c:/src/portmidi217/
- portmidi build : c:/mingw/portmidi
then can compile following command.
gcc.exe -c -g -i/c/src/portmidi217/pm_common -i/c/src/portmidi217/porttime -mmd -mp -mf build/debug/latency.o.d -o build/debug/latency.o latency.c mkdir -p dist/debug gcc.exe -o dist/debug/latency build/debug/latency.o -l/c/mingw/portmidi -lpmjni.dll -lportmidi.dll
building portmidi cmake
- download or use cmake
- in c:\cmake\bin folder double click
cmake-gui.exe
unzip portmidi folder c:\mingw\src\portmidi217
can see in next image
(replace t:\
c:\
of course)
press configure
settings described --> click next
settings described --> click ok
there errors click configure again
next looks better click configure again
settings described release or debug
maybe worked without c:\msys\1.0\bin\sh.exe
click configure again
looks --> click generate
cd builded c:\mingw\portmidi
open windows command type make
it takes short time build
there : .a , .dll
- copy
.a
c:\mingw\lib
- copy
.dll
c:\mingw\bin
- copy
c:\mingw\src\portmidi217\pm_common
,c:\mingw\src\portmidi217\porttime
.h folderlatency.c
is.
then can latency.c
compile described above, need adjust paths.
Comments
Post a Comment