Trouble Compiling Snes9x From Latest Master

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
SnesToolNoob
Snes9x White Belt
Posts: 5
Joined: Thu Mar 05, 2020 2:55 am

Trouble Compiling Snes9x From Latest Master

Post by SnesToolNoob »

I'm running 64-bit Windows 10. I downloaded the master branch of Snes9x from github and tried compiling it myself with the command "g++ -o snes9x.exe snes9x.cpp" , but I ran into a ton of errors in the form of undefined references in snes9x.cpp:

Code: Select all

C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x50): undefined reference to `S9xSetController(int, controllers, signed char, signed char, signed char, signed char)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xe6): undefined reference to `S9xSetController(int, controllers, signed char, signed char, signed char, signed char)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x17c): undefined reference to `S9xSetController(int, controllers, signed char, signed char, signed char, signed char)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1c6): undefined reference to `S9xSetController(int, controllers, signed char, signed char, signed char, signed char)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x210): undefined reference to `S9xSetController(int, controllers, signed char, signed char, signed char, signed char)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x25a): more undefined references to `S9xSetController(int, controllers, signed char, signed char, signed char, signed char)' follow
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x569): undefined reference to `S9xLoadCrosshairFile(int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x75d): undefined reference to `S9xSetControllerCrosshair(crosscontrols, signed char, char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x7fc): undefined reference to `fStream::fStream(_iobuf*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x812): undefined reference to `ConfigFile::LoadFile(Stream*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x82f): undefined reference to `fStream::~fStream()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x849): undefined reference to `fStream::~fStream()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x8bb): undefined reference to `ConfigFile::ConfigFile()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x8df): undefined reference to `ConfigFile::Clear()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x94e): undefined reference to `S9xGetDirectory(s9x_getdirtype)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xa50): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xa7b): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xaa6): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xadf): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xb10): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xb3e): more undefined references to `ConfigFile::GetBool(char const*, bool, bool*)' follow
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xc12): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xc35): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xc70): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xc93): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xcd4): undefined reference to `ConfigFile::GetStringDup(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xd08): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xd33): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xd5e): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xd89): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xdbd): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xdf1): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xe1c): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xe47): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xe72): undefined reference to `ConfigFile::GetInt(char const*, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xe9d): undefined reference to `ConfigFile::GetInt(char const*, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xec8): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xef3): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xf1e): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xf4c): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xf77): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0xfa2): more undefined references to `ConfigFile::GetBool(char const*, bool, bool*)' follow
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x104e): undefined reference to `ConfigFile::GetInt(char const*, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1079): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x10a4): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x10cf): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1106): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1134): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1162): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1190): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x11be): undefined reference to `ConfigFile::GetInt(char const*, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x11ec): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x121a): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1251): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1273): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x129f): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x12d9): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x132c): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x135b): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1386): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x13b1): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x13dc): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1407): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1432): more undefined references to `ConfigFile::GetBool(char const*, bool, bool*)' follow
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1454): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1471): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1491): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x14ae): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x14ce): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x14eb): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x150b): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1528): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1548): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1565): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1585): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x15a2): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x15c2): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x15df): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x15ff): undefined reference to `ConfigFile::Exists(char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x161c): undefined reference to `ConfigFile::GetString(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1651): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1688): undefined reference to `ConfigFile::GetUInt(char const*, unsigned int, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x16b6): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x16e4): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1715): undefined reference to `ConfigFile::GetBool(char const*, bool, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1746): undefined reference to `ConfigFile::GetInt(char const*, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1774): undefined reference to `ConfigFile::GetInt(char const*, int, bool*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1794): undefined reference to `S9xParsePortConfig(ConfigFile&, int)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1799): undefined reference to `S9xVerifyControllers()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x17fb): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1811): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1827): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x183d): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1853): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1869): more undefined references to `S9xMessage(int, int, char const*)' follow
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1dac): undefined reference to `S9xExtraUsage()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1dc2): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1dd8): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1ec8): undefined reference to `S9xAddCheatGroup(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1ee5): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x1efd): undefined reference to `S9xEnableCheatGroup(unsigned int)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x2aa4): undefined reference to `S9xAddCheatGroup(char const*, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x2ac1): undefined reference to `S9xMessage(int, int, char const*)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x2adc): undefined reference to `S9xEnableCheatGroup(unsigned int)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x2daf): undefined reference to `S9xParseArg(char**, int&, int)'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.text+0x2de2): undefined reference to `S9xVerifyControllers()'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.rdata$.refptr.Cheat[.refptr.Cheat]+0x0): undefined reference to `Cheat'
C:\Users\SnesToolNoob\AppData\Local\Temp\ccF0BUVy.o:snes9x.cpp:(.rdata$.refptr.Settings[.refptr.Settings]+0x0): undefined reference to `Settings'
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): In function `main':
C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
I'm very new to all of this, so any help would be appreciated. Let me know if I should include any additional information.
SnesToolNoob
Snes9x White Belt
Posts: 5
Joined: Thu Mar 05, 2020 2:55 am

Re: Trouble Compiling Snes9x From Latest Master

Post by SnesToolNoob »

Is this in the wrong section of the forums?
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: Trouble Compiling Snes9x From Latest Master

Post by OV2 »

To compile the windows version you'll need visual studio and then compile the provided project. The other ports use Makefiles or other build systems.

"g++ -o snes9x.exe snes9x.cpp" will never get you anywhere, as this would only compile one source file.
Post Reply