# OSX Building Documentation

FCEUX
The all in one NES/Famicom/Dendy Emulator
To compile FCEUX in osx, you must have fink or macports. The FCEUX developers recommend fink, since that's what they use, but then again, the only time they compile software on osx is when folks come nagging.

first, install the prerequisites.

macports requires these prerequisites: scons, libsdl, zenity, lua, gtk2

fink requires these prerequisites: try all the same ones as macports, but i know at least one of them is named gtk+2 instead. please report your results.

Building instructions for fink:

CFLAGS=-I/sw/include LDFLAGS=-L/sw/lib scons

if you are getting link errors about 64bitness then your system is compiling fceux as 64bit but fink is providing i386 libraries. you need to force fceux to compile 32 bits:

CFLAGS="-I/sw/include -arch i386" LDFLAGS="-L/sw/lib -arch i386" scons

None of the modifications listed at the paperkettle URL were necessary in our latest fink test only 18-jul-2010

This URL is a little old, but he got FCEUX compiling via fink

http://beesbuzz.biz/blog/e/2009/04/14-how_to_build_fceux_for_mac_os_x.php

Building instructions for macports:

CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib scons

This URL is fresh, and he got FCEUX compiling via macports:

http://www.paperkettle.com/blog/2010/07/17/fceux-2-14a-compiled-on-mac-osx-10-6/

---

At any given time while fooling around you may discover that scons begins behaving irrationally. To fix this, try deleting .sconsign.dblite which will clear out its memory of what has come before.

To clean your scons build, issue the main scons build command as discussed above with the -c parameter