Git Product home page Git Product logo

Comments (7)

jpage8580 avatar jpage8580 commented on June 15, 2024

Apologies. Only written / tested on Windows.
Possible issues due to me modifying the makefile.win
Iā€™m guessing if you get past this stage, the next will be RtMidi

from gtultra.

mrdudz avatar mrdudz commented on June 15, 2024

So what kind of environment is needed on windows to compile it? msys2?

from gtultra.

jpage8580 avatar jpage8580 commented on June 15, 2024

Files have just been added / modified to allow for Linux building.
I'm no expert on linux, so please see this thread: https://csdb.dk/release/?id=216054

msys2 is used, yes. There's very basic instructions here (see section 7: recompiling) which I followed:
https://github.com/leafo/goattracker2/blob/master/morphos/goattracker.guide

I basically had to keep hitting things until it eventually gave in and compiled!

from gtultra.

mrdudz avatar mrdudz commented on June 15, 2024

now its differently broken - also on windows :=)

first, a typo in the makefile:

diff --git a/src/makefile.common b/src/makefile.common
index b7cb513..82000bf 100644
--- a/src/makefile.common
+++ b/src/makefile.common
@@ -13,7 +13,7 @@ EXE=  $(PREFIX)gt2stereo$(SUFFIX) \
 all: $(EXE)
 
 $(PREFIX)gt2stereo$(SUFFIX): goatdata.o gt2stereo.o gsong.o gorder.o gpattern.o ginstr.o gtable.o gplay.o gdisplay.o \
-+gfile.o greloc.o ghelp.o gsound.o gconsole.o gsid.o ginfo.o gmidi.o gundo.o gchareditor.o RtMidi.o \
+gfile.o greloc.o ghelp.o gsound.o gconsole.o gsid.o ginfo.o gmidi.o gundo.o gchareditor.o RtMidi.o \
 resid/envelope.o resid/extfilt.o resid/filter.o resid/pot.o resid/sid.o resid/wave.o resid/wave6581__ST.o \
 resid/wave6581_P_T.o resid/wave6581_PS_.o resid/wave6581_PST.o resid/wave8580__ST.o resid/wave8580_P_T.o \
 resid/wave8580_PS_.o resid/wave8580_PST.o resid/voice.o \

then it fails at

$ make
g++ `sdl-config --cflags` -Ibme -Iasm -O3 -fpermissive   -c -o gmidi.o gmidi.cpp
gmidi.cpp:15:10: schwerwiegender Fehler: windows.h: Datei oder Verzeichnis nicht gefunden
   15 | #include <windows.h>
      |          ^~~~~~~~~~~
Kompilierung beendet.

some of the changes in https://pastebin.com/qDF6Vp8A probably need to be put in #ifdef _WIN32 so it works on both

edit: after doing this it compiles, and then again shows all those linker errors. something is seriously screwed up :)

from gtultra.

jpage8580 avatar jpage8580 commented on June 15, 2024

Will fix windows first. I'm fixing GTUltra issues too, so want to get everything in a good shape first. At that point, it will make sense to bring everything up to date / working on linux, etc.

Thanks for the feedback. Much appreciated

from gtultra.

Compyx avatar Compyx commented on June 15, 2024

Building on Windows also fails horribly with msys2, using an msys2 shell, so I'm assuming it needs to built from cmd.exe rather than from a proper shell?

from gtultra.

mrdudz avatar mrdudz commented on June 15, 2024

well it's not entirely fixed - the ifdefs are still missing

this is the missing patch:

diff --git a/src/RtMidi.cpp b/src/RtMidi.cpp
index ffcd5a0..e00a0c8 100644
--- a/src/RtMidi.cpp
+++ b/src/RtMidi.cpp
@@ -37,7 +37,9 @@
 */
 /**********************************************************************/
 
+#ifdef _WIN32
 #define __WINDOWS_MM__ // Include this line for windows building. Remove to build Linux
+#endif
 
 #include "RtMidi.h"
 
diff --git a/src/gmidi.cpp b/src/gmidi.cpp
index 4557e1a..55227cc 100644
--- a/src/gmidi.cpp
+++ b/src/gmidi.cpp
@@ -4,14 +4,11 @@
 
 #define GMIDI_C
 
-#define __WINDOWS__
-//#define __LINUX__
-
 #include <iostream>
 #include <cstdlib>
 #include <signal.h>
 
-#ifdef __WINDOWS__
+#ifdef _WIN32
 #include <windows.h>
 #endif

from gtultra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.