Problems building on Windows 7 / Visual Studio 2010

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Post Reply
AdmiralCurtiss
Snes9x White Belt
Posts: 1
Joined: Thu Jul 25, 2013 11:01 pm

Problems building on Windows 7 / Visual Studio 2010

Post by AdmiralCurtiss »

I've been having some issues building this emulator and would appreciate some help.

After fiddling around with the existing VS2008 files and not really getting anywhere, I got the VS2010 solution files from here. Using those I got pretty far, but I'm now stuck with a couple unresolved externals and no idea how to solve them:

Code: Select all

Error	1	error LNK2001: unresolved external symbol _crc32	c:\Users\___\Documents\GitHub\snes9x\win32\unzip.obj
Error	2	error LNK2001: unresolved external symbol _get_crc_table	c:\Users\___\Documents\GitHub\snes9x\win32\unzip.obj
Error	3	error LNK2001: unresolved external symbol __imp__PathFindExtensionW@4	c:\Users\___\Documents\GitHub\snes9x\win32\wsnes9x.obj
Error	4	error LNK2001: unresolved external symbol __imp__PathFindFileNameW@4	c:\Users\___\Documents\GitHub\snes9x\win32\wsnes9x.obj
Error	5	error LNK2001: unresolved external symbol "public: wchar_t * __thiscall CXML::getNodeContent(wchar_t const *)" (?getNodeContent@CXML@@QAEPA_WPB_W@Z)	c:\Users\___\Documents\GitHub\snes9x\win32\CDirect3D.obj
Error	6	error LNK2001: unresolved external symbol "public: wchar_t * __thiscall CXML::getAttribute(wchar_t const *,wchar_t const *)" (?getAttribute@CXML@@QAEPA_WPB_W0@Z)	c:\Users\___\Documents\GitHub\snes9x\win32\CDirect3D.obj
Error	7	error LNK2001: unresolved external symbol "public: bool __thiscall CXML::loadXmlFile(wchar_t const *)" (?loadXmlFile@CXML@@QAE_NPB_W@Z)	c:\Users\___\Documents\GitHub\snes9x\win32\CDirect3D.obj
Error	8	error LNK2001: unresolved external symbol "public: __thiscall CXML::~CXML(void)" (??1CXML@@QAE@XZ)	c:\Users\___\Documents\GitHub\snes9x\win32\CDirect3D.obj
Error	9	error LNK2001: unresolved external symbol "public: __thiscall CXML::CXML(void)" (??0CXML@@QAE@XZ)	c:\Users\___\Documents\GitHub\snes9x\win32\CDirect3D.obj

I got the code by cloning this Github repo, then got:
libpng from here, lpng162.7z: http://sourceforge.net/projects/libpng/files/
zlib from here, zlib128.zip: http://zlib.net/
FMOD Ex from here, fmodapi44417win-installer.exe: http://www.fmod.org/fmod-downloads.html
as well as the CG Toolkit, the DirectX SDK June 2010, as well as the DirectX SDK August 2007 for ddraw.lib.

As far as I can tell, the build process finds all those dependencies just fine, yet I still end up with the above unresolved externals. Any idea what I'm missing?
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: Problems building on Windows 7 / Visual Studio 2010

Post by OV2 »

crc32 and get_crc_table are zlib functions, so you have a problem linking to that somewhere.

PathFindExtension/PathFindFileName are in shlwapi.lib, you need to add that to the linker "Additional Dependencies" setting.

CXML is a new file in the repository, just add CXML.cpp to the project.
Post Reply