Midi and windows SDK (aka platform SDK)

Not really midi related turned out to be more qmake and including libs after all. For a few day I was busy debugging the linker error messages gcc (mingw) was spitting at me and couldn't find out what was going on. I had correctly installed the latest platform sdk for windows which is now known as windows sdk and linked to it. But for some reason it was still blocking when linking towinmm.libfor midi:

g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "releaseGT-8FxFloorBoard.exe" object_script.GT-8FxFloorBoard.Release -L"c:Qt4.3.1lib" -lmingw32 -lqtmain releaseGT-8FxFloorBoard_res.o C:/PROGRA~1/MICROS~2/LIB/WINMM.LIB -lQtXml4 -lQtG ui4 -lQtCore4
./releasemidiIO.o(.text+0x91):midiIO.cpp: undefined reference to `midiOutGetErrorTextW@12'
./releasemidiIO.o(.text+0x381):midiIO.cpp: undefined reference to `midiOutGetErrorTextW@12'
./releasemidiIO.o(.text+0xea8):midiIO.cpp: undefined reference to `midiOutOpen@20'
./releasemidiIO.o(.text+0x1057):midiIO.cpp: undefined reference to `midiOutPrepareHeader@12'
./releasemidiIO.o(.text+0x1086):midiIO.cpp: undefined reference to `midiOutLongMsg@12'
./releasemidiIO.o(.text+0x13d0):midiIO.cpp: undefined reference to `midiOutUnprepareHeader@12'
./releasemidiIO.o(.text+0x1bcb):midiIO.cpp: undefined reference to `midiOutClose@4'
./releasemidiIO.o(.text+0x2115):midiIO.cpp: undefined reference to `midiInAddBuffer@12'
./releasemidiIO.o(.text+0x22b5):midiIO.cpp: undefined reference to `midiOutOpen@20'
./releasemidiIO.o(.text+0x24d4):midiIO.cpp: undefined reference to `midiOutShortMsg@8'
./releasemidiIO.o(.text+0x3049):midiIO.cpp: undefined reference to `midiOutShortMsg@8'
./releasemidiIO.o(.text+0x3074):midiIO.cpp: undefined reference to `midiOutClose@4'
./releasemidiIO.o(.text+0x31ec):midiIO.cpp: undefined reference to `midiInOpen@20'
./releasemidiIO.o(.text+0x323c):midiIO.cpp: undefined reference to `midiInPrepareHeader@12'
./releasemidiIO.o(.text+0x326a):midiIO.cpp: undefined reference to `midiInAddBuffer@12'
./releasemidiIO.o(.text+0x3585):midiIO.cpp: undefined reference to `midiInClose@4'
./releasemidiIO.o(.text+0x3bbe):midiIO.cpp: undefined reference to `midiInStart@4'
./releasemidiIO.o(.text+0x3d0b):midiIO.cpp: undefined reference to `midiInReset@4'
./releasemidiIO.o(.text+0x4109):midiIO.cpp: undefined reference to `midiInUnprepareHeader@12'
./releasemidiIO.o(.text+0x485f):midiIO.cpp: undefined reference to `midiInGetNumDevs@0'
./releasemidiIO.o(.text+0x48a5):midiIO.cpp: undefined reference to `midiInGetDevCapsW@12'
./releasemidiIO.o(.text+0x4a6f):midiIO.cpp: undefined reference to `midiOutGetNumDevs@0'
./releasemidiIO.o(.text+0x4ab5):midiIO.cpp: undefined reference to `midiOutGetDevCapsW@12'
collect2: ld returned 1 exit status
mingw32-make[1]: ** [releaseGT-8FxFloorBoard.exe] Error 1
mingw32-make[1]: Leaving directory `E:/GT-8 Fx FloorBoard'
mingw32-make: ** [release] Error 2

Turned out to be qmake: LIBS += /path/to/your/lib/Libfile.lib seems to be broken and LIBS += -L/path/to/your/lib -lLibfile seems to work fine.

Latest windows SDK is the Vista SDK which is compatible with Windows XP.

...

Read more posts by this author.

The Netherlands