Wohlstand / libADLMIDI

A Software MIDI Synthesizer library with OPL3 (YMF262) emulator
GNU Lesser General Public License v3.0
174 stars 17 forks source link

Demo MIDI player is impossible to compile (at least for me) #26

Closed freq-mod closed 6 years ago

freq-mod commented 6 years ago

I know that most likely it's not a bug, but I seriously don't know what I am doing wrong. Trying to make adlmidiplay returns with error: adlmidifail

I am running latest version of MinGW on Windows 7. I have SDL2 installed.

Wohlstand commented 6 years ago

It's my fault: SIGHUP is UNIX-only signal and is absence in Windows (no matter MinGW or MSVC environment, but Cygwin has that), I'll fix that

Wohlstand commented 6 years ago

If it will fail linking, try to run make -f Makefile.win32

freq-mod commented 6 years ago

OK, now it's better, as it doesn't cry about SIGHUP anymore. But still something is wrong, idk why: adlmidifailagain (if it's my fault, sorry about that, I've never truly succeeded in compiling anything in Windows, always relied on Linux and ever so simple sudo make install)

Wohlstand commented 6 years ago

Do you have bin folder? Try md ..\..\bin and retry make

Wohlstand commented 6 years ago

Or I'll try to debug on Windows VM when I will come to my home

Wohlstand commented 6 years ago

Also, to build demo player you must build libADLMIDI itself, seems you wasnt built it as bin folder isn't exist

freq-mod commented 6 years ago

Thanks for patience :D However: libadlmidi itself also won't compile! After running "make" it makes two directories: \obj and -p, then craps out and dies. I would like to provide screen, but it's in my native language rather than English or Russian, so it won"t help ;_; (bin folder was created)

as for adlmidiplay manually creating bin folder doesn't do much

Wohlstand commented 6 years ago

Okay, I have tried to build that by myself and it fails too. The reason of this fail because Makefile which is used by default is designed for UNIX, not for Windows. Even Makefile.w32 fails too when I trying to use it manually... Do you have CMake installed? I gonna to replace current building system with CMake (even an issue for this I have created) which will work much better and will be much more friendly and crossplatform than "crutches" (slang "workaround" in Russian) of manually coded Makefiles

Wohlstand commented 6 years ago

In this night I have been added CMake build! Try to build the project with enabled "WITH_MIDIPLAY" option (that must be easy in the CMake's GUI) or just use cmake -DWITH_MIDIPLAY=ON -DCMAKE_BUILD_TYPE=Release .. configure command

freq-mod commented 6 years ago

OK so installed CMake, downloaded sources, configured and generated build using cmake-gui. It produced a bunch of folders, files, nothing useful. Then I noticed a Makefile, trying to build it: adlmidifail3

so still not done yet. or I'm doing sth wrong, which is more plausible lol

Wohlstand commented 6 years ago

Disable gen_adldata building, I working on fixing this, it requires C++11, but I don't want enable C++11 flag for everything, for gen_adldata only. (it's weird, but on Windows it don't want to add CXX flag to individual target instead of settings CXX flags for entire project)

I.e.:

cmake -DWITH_MIDIPLAY=ON -DWITH_GENADLDATA=OFF -DCMAKE_BUILD_TYPE=Release ..
freq-mod commented 6 years ago

well, that was close, but still compilation fails at the very end: adlmidifail4

Wohlstand commented 6 years ago

You must install libpthread (POSIX Threads) dev pack into your MinGW (through "MinGW Get" it's easy, just find it carefully)

freq-mod commented 6 years ago

Well, it has finally compiled!! Thank you SO much!

Wohlstand commented 6 years ago

I'm glad to help you, then, I'll close this now :wink: