Nach wrote:grinvader wrote:Anyone will be able to compile it on any supported OS. That's already useful.
@Nach: do you have any idea why the win32 port requires MSVC to compile ?
Hard to say what MinGW's exact problem is. I think it's that it has trouble running DirectX properly. When I compile with MinGW (after some modification), ZSNES starts, but loading a ROM crashes it.
If we end up only having to maintain one port, instead of 3, it would help when we want to change more low level stuff like SRAM Path, or the GUI in general.
How are you compiling it?
Here is what I've been trying (without much success).
Install MinGW 3.10
Upgrade to gcc 3.4.2 (and g++)
Installed SDL devel, SDL.dll (So it can run the test program, but I guess I could just disable the test)
Installed zlib, and libpng
install nasm
Modifed the makefile.win. Replace cl with gcc, and change the options. /Ox becomes -O3. I don't know what /G6 is so I left it out.
Stuck the dx8 headers into the mingw include directory.
Grabbed some dx8 libs for mingw (there is a makefile, but I used the ones that were already in the directory, but I haven't made it to the link step yet, so I'm not sure if this works or not)
Problem:
g++ -O3 -c -D__WIN32__ -o win/winlink.obj win/winlink.cpp
win/winlink.cpp:141: warning: `SemaphoreMax' initialized and declared `extern'
win/winlink.cpp:242: error: `_int64' does not name a type
win/winlink.cpp:254: warning: converting of negative value `-0x000000001' to `long unsigned int'
win/winlink.cpp:328: error: ISO C++ forbids declaration of `InputAcquire' with no type
win/winlink.cpp: In function `BOOL InputRead()':
win/winlink.cpp:395: error: ISO C++ forbids declaration of `PrevZ' with no type
win/winlink.cpp: In function `void ExitFunction()':
win/winlink.cpp:463: error: `_asm' undeclared (first use this function)
win/winlink.cpp:463: error: (Each undeclared identifier is reported only once for each function it appears in.)
win/winlink.cpp:463: error: expected `;' before '{' token
win/winlink.cpp: At global scope:
win/winlink.cpp:668: error: ISO C++ forbids declaration of `InitSound' with no type
win/winlink.cpp:792: error: ISO C++ forbids declaration of `ReInitSound' with no type
win/winlink.cpp

warning: converting of negative value `-0x000000001' to `long unsigned int'
win/winlink.cpp

warning: converting of negative value `-0x000000001' to `long unsigned int'
win/winlink.cpp: In function `void Start60HZ()':
win/winlink.cpp

error: `update_ticks_pc2' undeclared (first use this function)
win/winlink.cpp

error: `freq' undeclared (first use this function)
win/winlink.cpp

error: `update_ticks_pc' undeclared (first use this function)
win/winlink.cpp

error: `start' undeclared (first use this function)
win/winlink.cpp

error: `start2' undeclared (first use this function)
win/winlink.cpp: In function `void Start36HZ()':
win/winlink.cpp

error: `update_ticks_pc2' undeclared (first use this function)
win/winlink.cpp

error: `freq' undeclared (first use this function)
win/winlink.cpp

error: `update_ticks_pc' undeclared (first use this function)
win/winlink.cpp

error: `start' undeclared (first use this function)
win/winlink.cpp

error: `start2' undeclared (first use this function)
win/winlink.cpp: In function `void initwinvideo()':
win/winlink.cpp

error: `freq' undeclared (first use this function)
win/winlink.cpp

error: `_asm' undeclared (first use this function)
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp: At global scope:
win/winlink.cpp

error: ISO C++ forbids declaration of `GUI36hzcall' with no type
win/winlink.cpp

error: ISO C++ forbids declaration of `Game60hzcall' with no type
win/winlink.cpp: In function `void CheckTimers()':
win/winlink.cpp

error: `end2' undeclared (first use this function)
win/winlink.cpp

error: `start2' undeclared (first use this function)
win/winlink.cpp

error: `update_ticks_pc2' undeclared (first use this function)
win/winlink.cpp

error: `end' undeclared (first use this function)
win/winlink.cpp

error: `start' undeclared (first use this function)
win/winlink.cpp

error: `update_ticks_pc' undeclared (first use this function)
win/winlink.cpp: In function `void UpdateVFrame()':
win/winlink.cpp

error: `_asm' undeclared (first use this function)
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp: At global scope:
win/winlink.cpp

error: `_int64' does not name a type
win/winlink.cpp

error: integer constant is too large for "long" type
win/winlink.cpp

error: `_int64' does not name a type
win/winlink.cpp

error: integer constant is too large for "long" type
win/winlink.cpp

error: `_int64' does not name a type
win/winlink.cpp

error: integer constant is too large for "long" type
win/winlink.cpp

error: `_int64' does not name a type
win/winlink.cpp

error: integer constant is too large for "long" type
win/winlink.cpp: In function `void drawscreenwin()':
win/winlink.cpp

error: `_asm' undeclared (first use this function)
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp: In function `void WinUpdateDevices()':
win/winlink.cpp

error: `_asm' undeclared (first use this function)
win/winlink.cpp

error: expected `;' before '{' token
win/winlink.cpp: In function `void FrameSemaphore()':
win/winlink.cpp

error: `end' undeclared (first use this function)
win/winlink.cpp

error: `update_ticks_pc' undeclared (first use this function)
win/winlink.cpp

error: `start' undeclared (first use this function)
win/winlink.cpp

error: `freq' undeclared (first use this function)
make: *** [win/winlink.obj] Error 1
Lots of errors in winlink.cpp.
How did you get this to compile? What version of gcc?
fyi: FCEU compiles in mingw with DX7 and runs just fine.