Post subject: Compiling FCEU on windows
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Ok, I've followed the steps listed here but I think they are a little outdated. I've downloaded everything, the MinGW binary isn't available for the current version, but I downloaded the previous version (MinGW-3.1.0-1.exe). I also got all the other files. Installing mingw and mysys was no problem. Make-ing the SDL libs is though. When I try "make install-sdl prefix=/mingw" I get the error "make: *** No rule to make target 'install-sdl'. Stop." and I'm at a loss now. I don't know how to fix these "make"-problems. Also, "./configure" doesn't work, shouldn't that at least work? He can't find it at all right now... Thanks in advance.
qfox.nl
Emulator Coder, Skilled player (1311)
Joined: 12/21/2004
Posts: 2687
"No rule" might mean you aren't running the make command from the right directory, so it can't find what you're telling it to make. Or it might be because ./configure didn't work first (for the same reason). If ./configure doesn't still work then maybe you also have to run autoconf first, but then again, the instructions don't even mention needing to run ./configure at all for making libsdl. The only thing I see that I did differently from those instructions is that I put SDL-devel-1.2.9-mingw32.tar.gz in C:\msys\1.0\home, not C:\msys\1.0\home\some_username
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Ok, here's where the outdation might kick in. What do you do after this? Because the only file available on the website now is SDL-devel-1.2.11-mingw32.tar.gz (and not .9). Is it possible something changed slightly? I tried putting it in home btw, no luck either. What exactly do you execute once in the SDL directory? The files in the root of that dir for the .11 release are: [.] [..] [bin] BUGS [build-scripts] COPYING [docs] docs.html [include] INSTALL [lib] Makefile README README-SDL.txt [share] [test] WhatsNew Other then that, I've followed the tuorial to the letter :/
qfox.nl
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Hm can anyone please confirm that the last source is actually complete? It seems to be missing a few definitions, but that could entirely be my problem. I've not yet got it running, but I downloaded dev-cpp as that seemed to be "the" IDE to go with right now. It at least includes packages for mingw and zlib. I can't seem to just import the entire directory structure of the source though. Maybe I'm not looking good. But anyways, some of the variable names don't show up in any of the files (like BotInput[] in BasicBot) so that's why I'm wondering whether it's complete :) Damnit, I want to compile it :/
qfox.nl
Emulator Coder, Skilled player (1311)
Joined: 12/21/2004
Posts: 2687
qFox wrote:
But anyways, some of the variable names don't show up in any of the files (like BotInput[] in BasicBot) so that's why I'm wondering whether it's complete :)
BotInput is in fceu.h. It looks like you need to make sure _USE_SHARED_MEMORY_ is defined for it to compile, since he didn't declare BotInput for the other case. I've never tried compiling FCEU with any IDE, it should work but it has the potential to add to the number of problems you encounter in getting started.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I got it to work, with some more from nitsuja. For other people who like me have little knowledge about the compiling part, make files, and all that but who want to give the source a try in Windows: Install the MinGW (I used MinGW-3.1.0-1.exe). Install the msys (I used MSYS-1.0.10.exe). Tell the post-installer of msys where you installed MinGW, seems to be case-insensitive. Skip the SDL part (is this only required for Linux perhaps?) Install zlib (in msys, follow the tutorial) (I used zlib-1.2.3.tar.tar). Download Luke's last source (21 april 2006). This release is not complete as it's missing the make files and a bunch of other files I know little about, so you need an older source-package to fill this up (Luke didn't touch these files so that's probably why he didn't include them). Go to the root of the directory with those older files, it should contain a directory "src" with Luke's source files. Run: "windres -o src/res.o src/drivers/win/res.res" Run: "make" The exe will appear in the src dir. You can verify the operation worked properly by running the exe and looking at the date in the about box. Should be only a few seconds ago ;) And that should be it. Thanks a lot, now I can start debugging a little :)
qfox.nl
Ambassador, Experienced player (710)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Ok, I am trying this since it seems more promising than compiling in Linux. I got up to the make step and then I get a bunch of errors referencing drivers/win/input.h and drivers/win/input.c. What did I do wrong? I work as an application-level engineer so I don't know how to compile entire programs myself. ;)
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I dont remember getting those errors. Are you sure you've got the entire thing and running the right make (and I dont have a clue about that stuff either ;) ? The make wasnt a real problem for me. Getting there was the harder part, especially not knowing SDL wasnt required in windows and trying to install it anyways... sigh.
qfox.nl
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
TheAxeMan wrote:
Ok, I am trying this since it seems more promising than compiling in Linux. I got up to the make step and then I get a bunch of errors referencing drivers/win/input.h and drivers/win/input.c.
You are missing Windows api or DirectX libraries.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Oh, if that's the case, you need to extract the files from those zips to the library part of your compiler (just like the tutorial tells you...)
qfox.nl
Emulator Coder, Former player
Joined: 10/2/2005
Posts: 563
Location: Toronto, Ontario
Howdy all. I'm not as experienced with C as I'd like to be, and I'm working on merging the updated mappers with 0.98.17. I figure this is good practice, but I need a hand deciphering make errors. What I'm essentially doing is merging changes from fceu-mm-june16-2006 to the existing source one file at a time (this way I can see what's changed and how). I've currently updated all the mappers/boards, and am making changes to the main source files that reference these changes, but when I build, I get the following error:
$ make
Making all in src
make[1]: Entering directory `/home/Maximus/fceu-0.98.17-wip/src'
source='general.c' object='general.o' libtool=no \
depfile='.deps/general.Po' tmpdepfile='.deps/general.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fceu\" -DVERSION=\"0.98.17\" -D_GNU_SOURCE=1 -DHAVE_LIBZ=1 -DNETWORK=1 -DPSS_STYLE=2 -DWIN32=1 -DC80x86=1 -DLSB_FIRST=1 -DFCEU_VERSION=\"0.98.17\" -DFCEU_VERSION_NUMERIC=9817 -DFRAMESKIP=1       -g -O2 -c -o general.o `test -f 'general.c' || echo './'`general.c
In file included from general.c:37:
driver.h:196: error: conflicting types for 'MOVIE_INFO'
driver.h:196: error: previous declaration of 'MOVIE_INFO' was here
driver.h:203: error: conflicting types for 'FCEUI_MovieGetInfo'
driver.h:203: error: previous declaration of 'FCEUI_MovieGetInfo' was here
driver.h:203: error: conflicting types for 'FCEUI_MovieGetInfo'
driver.h:203: error: previous declaration of 'FCEUI_MovieGetInfo' was here
driver.h:290: error: redefinition of typedef 'TestCommandState'
driver.h:290: error: previous declaration of 'TestCommandState' was here
driver.h:296: error: redeclaration of `enum EMUSPEED_SET'
driver.h:297: error: conflicting types for 'EMUSPEED_SLOWEST'
driver.h:297: error: previous definition of 'EMUSPEED_SLOWEST' was here
driver.h:298: error: conflicting types for 'EMUSPEED_SLOWER'
driver.h:298: error: previous definition of 'EMUSPEED_SLOWER' was here
driver.h:299: error: conflicting types for 'EMUSPEED_NORMAL'
driver.h:299: error: previous definition of 'EMUSPEED_NORMAL' was here
driver.h:300: error: conflicting types for 'EMUSPEED_FASTER'
driver.h:300: error: previous definition of 'EMUSPEED_FASTER' was here
driver.h:302: error: conflicting types for 'EMUSPEED_FASTEST'
driver.h:302: error: previous definition of 'EMUSPEED_FASTEST' was here
make[1]: *** [general.o] Error 1
Any pointers as to what I should be looking for would be appreciated (may have bit off more than I can chew with this one)
Emulator Coder, Former player
Joined: 10/2/2005
Posts: 563
Location: Toronto, Ontario
Nevermind, i'm just dumb ... helps if you're not missing an #include :P