bsnes :: Compilation Guide2011-02-27
If you wish to compile bsnes from source, hopefully this guide will help.
Windows
First, install the latest version of TDM/GCC.
Second, you will need to download the DirectX SDK (Nov08) headers. Newer headers will not work, as Microsoft has added Visual C++-specific extensions to their more recent header files.
Third, obtain the latest version of glext.h.
Now you must update the out-of-date headers that ship with MinGW GCC. Navigate to the MinGW include directory. The default paths are:
C:/MinGW32/include C:/MinGW64/x86_64-w64-mingw32/include
Copy the DirectX headers into the include folder, and copy the glext.h header into the include/GL folder. Overwrite all files that already exist.
Finally, you are ready to compile bsnes. Run the cc.bat file included in the bsnes source folder. You may also choose to edit the Makefile in this same folder to set various options.
Linux
You will need to install various development headers and libraries in order to compile bsnes. This will vary per distribution. I will explain the process for Debian Wheezy and later here, but you are on your own for other distros, I'm afraid.
First, install the following packages:
sudo apt-get install build-essential gcc-4.6 g++-4.6 libgtk2.0-dev libqt4-dev libsdl1.2-dev sudo apt-get install libpulse-dev libopenal-dev libao-dev libxv-dev
And now you can compile the bsnes source code by invoking its Makefile. You can also optionally choose to install the application. Doing so will place an icon for it in your applications menu, and copy over some application resources to your home folder.
make sudo make install
OS X
I'm afraid there are no steps for building on OS X at this time. This is due to Apple not providing a compiler capable of utilizing both C++0x and Cocoa. In the mean-time, you may wish to use Richard Bannister's OS X version, which can be obtained here. There is also Mednafen and Open Emu, which also include bsnes.