You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only after that the command autoreconf --install finished successfully
After that I was able to execute ./configure --prefix=/mingw CXXFLAGS=-fpermissive. But before configuring it's better to fix SDL (below)
SDL config problem. By default sdl-config script forces your application to be a windows app, not console, and it intercepts output to sderr and stdout and redirects it into files.
I've found if you edit sdl-config the configure will fail (sdl won't be found) so I had to edit the resulting Makefile in the following way: removed -Dmain=SDL_main and -lSDLmain and changed -mwindows into -mconsole
Another important thing: insert #undef main in the adplug.cc right before the main().
sdl.h header problem.
As noted in another issue, windows fs is not case-sensitive, so #include <SDL.h> and #include "sdl.h" are misinterpreted as 'include local sdl.h` by the compiler. To overcome this, better rename ./src/sdl.h into ./src/sdlx.h and change all #includes accordingly
Strange typecast is needed in adplug.cc:
diff --git a/src/adplay.cc b/src/adplay.cc
index d93d16f..2973ca0 100644
--- a/src/adplay.cc
+++ b/src/adplay.cc
@@ -239,7 +239,7 @@ static int decode_switches(int argc, char **argv)
{NULL, 0, NULL, 0} // end of options
};
- while ((c = getopt_long(argc, argv, "8f:b:d:irms:ol:hVe:O:D:qv",
+ while ((c = getopt_long(argc, (char* const** (*)())argv, "8f:b:d:irms:ol:hVe:O:D:qv",
long_options, (int *)0)) != EOF) {
switch (c) {
case '8': cfg.bits = 8; break;
After all above the make will succeed and the resulting adplay.exe will show output in the console
update aclocal to use m4/ directory and put initial needed m4 files there, including pkg.m4
getopt.h getopt1.c should probably be updated to receive char *const argv[] which is what GNU libc getopt_long() implementation expect, removing the need to that typecast
rename sdl.h to avoid name-clash (we can probably expect that different compilers to have different order of include directories)
Add support for SDL2.0 and fallback to SDL1.2. For audio I believe the API is identical, and perhaps fixes a couple of the issues.
Hi.
It's possible to compile a console application with mingw32, though you need some manual config
Only after that the command
autoreconf --install
finished successfullyAfter that I was able to execute
./configure --prefix=/mingw CXXFLAGS=-fpermissive
. But before configuring it's better to fix SDL (below)SDL config problem. By default
sdl-config
script forces your application to be a windows app, not console, and it intercepts output to sderr and stdout and redirects it into files.I've found if you edit sdl-config the configure will fail (sdl won't be found) so I had to edit the resulting Makefile in the following way: removed
-Dmain=SDL_main
and-lSDLmain
and changed-mwindows
into-mconsole
Another important thing: insert
#undef main
in the adplug.cc right before the main().sdl.h header problem.
As noted in another issue, windows fs is not case-sensitive, so
#include <SDL.h>
and#include "sdl.h"
are misinterpreted as 'include local sdl.h` by the compiler. To overcome this, better rename ./src/sdl.h into ./src/sdlx.h and change all #includes accordinglyStrange typecast is needed in adplug.cc:
After all above the make will succeed and the resulting adplay.exe will show output in the console
dmitrysmagin@3f1135a
The text was updated successfully, but these errors were encountered: