It is currently Tue Dec 12, 2017 12:37 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Apr 11, 2014 5:28 am 
Offline
Snes9x White Belt

Joined: Fri Apr 11, 2014 5:17 am
Posts: 7
I removed the HAVE_LIBPNG preprocessor definition as well as UNZIP_SUPPORT, ZLIB, and FMODEX_SUPPORT.
I installed the June 2008 DirectX SDK and the CG stuff from NVIDIA.
I'm running Visual Studio 2010 so the .sln and .csproj files ran through the conversion wizard.

I'm still getting these 2 errors:
Error 1 error C1083: Cannot open include file: 'png.h': No such file or directory C:\Data\Dev\git\snes9x\win32\CD3DCG.cpp 182 1 Snes9X
Error 2 error C1083: Cannot open include file: 'png.h': No such file or directory C:\Data\Dev\git\snes9x\win32\CGLCG.cpp 181 1 Snes9X

Any advice?
Sorry if this is a naive question, C++ is not my core language.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 11, 2014 9:25 am 
Offline
Official Win32 Porter/Dev
User avatar

Joined: Thu Aug 30, 2007 10:15 pm
Posts: 594
Remove the png.h include line from CD3DCG.cpp, in CGLCG.cpp it should be
Code:
#ifdef HAVE_LIBPNG
#include <png.h>
#endif


You'll also have to remove libpngXXX.lib from the dependency list in the project settings (Linker->Input->Additional Dependencies).


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 11, 2014 3:26 pm 
Offline
Snes9x White Belt

Joined: Fri Apr 11, 2014 5:17 am
Posts: 7
Thanks. I made the changes you mentioned and now get these 5 errors instead:
Error 1 error C1083: Cannot open include file: 'zlib.h': No such file or directory C:\Data\Dev\git\snes9x\unzip\ioapi.c 13 1 Snes9X
Error 2 error C1083: Cannot open include file: 'zlib.h': No such file or directory C:\Data\Dev\git\snes9x\unzip\iowin32.c 12 1 Snes9X
Error 3 error C1083: Cannot open include file: 'zlib.h': No such file or directory C:\Data\Dev\git\snes9x\unzip\mztools.c 11 1 Snes9X
Error 4 error C1083: Cannot open include file: 'zlib.h': No such file or directory C:\Data\Dev\git\snes9x\unzip\unzip.c 41 1 Snes9X
Error 5 error C1083: Cannot open include file: 'zlib.h': No such file or directory C:\Data\Dev\git\snes9x\unzip\zip.c 17 1 Snes9X
Plus 49 intellisense errors.

I tried surrounding them with:
#ifdef ZLIB
#endif
But that seemed to cause more errors.


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 12, 2014 2:58 pm 
Offline
Snes9x White Belt

Joined: Fri Apr 11, 2014 5:17 am
Posts: 7
I decided to start over and this time try to build and include zlib as it doesn't seem very optional.
As before I removed FMODEX_SUPPORT and HAVE_LIBPNG and made the 2 changes you mentioned.

I slowly included all the .h files until I got to linker errors.
Then I included each missing .lib file.

Now I get 26 errors similar to this:
error LNK2019: unresolved external symbol _gzclose referenced in function "public: bool __thiscall ConfigFile::LoadFile(char const *)" ([email protected]@@[email protected]) Category: Error, Default Order: 38, Description: error LNK2019: unresolved external symbol _gzclose referenced in function "public: bool __thiscall ConfigFile::LoadFile(char const *)" ([email protected]@@[email protected]), File: C:\Data\Dev\git\snes9x\win32\conffile.obj, Project: Snes9X

It would seem that my zlibdmt.lib file is missing some expected symbols.
I'm building zlib 1.2.8.
I use the .sln file located in: \contrib\vstudio\vc10
I set the build configuration to release 32 bit.
It builds 6 projects.
I go into x86/ZlibDllRelease and copy zlibwapi.lib to a folder where the SNES9X solution will find it and rename it to zlibdmt.lib.
I expect this process is incorrect since I'm getting missing symbols related to zlib.
Can you tell me what I'm doing wrong?
The how2compile.txt file does not verify what the original name of the .lib would be so I'm not sure I'm renaming the correct file.
It also states that I should compile against VC's multi-threaded C runtime.
I have no idea how to do that, is that an option I change in the zlibvc project properties?


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 12, 2014 3:42 pm 
Offline
Snes9x White Belt

Joined: Fri Apr 11, 2014 5:17 am
Posts: 7
Well, I just got it building by using the pre-compiled zdll.lib from the ZLIB page.
It seems to work, though it's a debug build.
I'm just happy it works at all though.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group