snes9xgit / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
2.65k stars 457 forks source link

How to compile application (windows) #476

Closed DQ318 closed 5 years ago

DQ318 commented 5 years ago

Good afternoon people! I would like to know what procedures are required to do the complete compilation of the application (for windows). I am studying the code and learning the C ++ language and I do not know very well how to start, sorry. ^^ " I thank everyone. Cheers!

bearoso commented 5 years ago

This is a very bad project to learn C++ with because much of the code is an ancient mess cobbled together by people with very different styles. You'd be much better off finding a nice tutorial or a small, recent project to learn from.

DQ318 commented 5 years ago

Hi @bearoso.

Thanks for answering. Initially I just want to learn the basics and see how it was done. My goal is to just translate the commands to my language at the moment but doing this directly in the code. Could you teach me then just how to compile and run on Windows? Thank you again for replying

bearoso commented 5 years ago

OV2 put together a document describing how to compile for windows here: https://github.com/snes9xgit/snes9x/blob/master/win32/docs/how2compile.txt

DQ318 commented 5 years ago

Great.

Could you give me some more help, please?

I followed the procedures contained in the TXT file instructions however, visual studio 2017 encountered errors in the build. Both the Debugger version and the Release version have the following error after clicking "START" or "LOCAL WINDOWS DEBUGGER":


Microsoft Visual Studio

Unable to start program 'C: \ Users \ snes9x-master \ snes9x-master \ win32 \ snes9x.exe'.

The system can not find the file specified.


OK

bearoso commented 5 years ago

As long as you followed the directions correctly, it will compile. You need to look further up the log to find where the build failed.

DQ318 commented 5 years ago

I'm almost succeeding (I think) ... ^^ "

Apparently, all errors shown in the log refer to the ZLIB and LIBPNG libraries, that are not being located while compiling.

The strange thing is that I have everything downloaded here in the directories and even then, VS2017 can not locate at the time of compilation.

Reading the TXT file the information says to do everything automatically but even then, I downloaded it and sent it all to those folders.

  • zlib (optional, ZLIB define, enabled by default) - the default solution includes a zlib project that builds appropriately (force includes _tfwopen.h for unicode support in s9x). The zlib directory should reside at win32/zlib/src, or you can download it automatically with git submodule init && git submodule update.

Could you help me with that? I'm almost there

Thank you all!

OV2 commented 5 years ago

Did you use the git commands to get the libraries or did you manually download them? It might help if you post the actual build error output.

DQ318 commented 5 years ago

Hi, @OV2 !

Right. I'll leave here the complete error LOG. The 3 solutions are failing, I believe for lack of files. I downloaded them all manually, cloned the repositories, did not use any git command. If this is the wrong way (which I'm clearly seeing is the wrong one), how do I get all the files correctly?

Thank you everyone's attention, and thank you very much.

1>------ Build started: Project: zlib, Configuration: Release Unicode Win32 ------ 1>adler32.c 1>c1 : fatal error C1083: Cannot open source file: 'src\adler32.c': No such file or directory 1>compress.c 1>c1 : fatal error C1083: Cannot open source file: 'src\compress.c': No such file or directory 1>crc32.c 1>c1 : fatal error C1083: Cannot open source file: 'src\crc32.c': No such file or directory 1>deflate.c 1>c1 : fatal error C1083: Cannot open source file: 'src\deflate.c': No such file or directory 1>gzclose.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzclose.c': No such file or directory 1>gzlib.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzlib.c': No such file or directory 1>gzread.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzread.c': No such file or directory 1>gzwrite.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzwrite.c': No such file or directory 1>infback.c 1>c1 : fatal error C1083: Cannot open source file: 'src\infback.c': No such file or directory 1>inffast.c 1>c1 : fatal error C1083: Cannot open source file: 'src\inffast.c': No such file or directory 1>inflate.c 1>c1 : fatal error C1083: Cannot open source file: 'src\inflate.c': No such file or directory 1>inftrees.c 1>c1 : fatal error C1083: Cannot open source file: 'src\inftrees.c': No such file or directory 1>trees.c 1>c1 : fatal error C1083: Cannot open source file: 'src\trees.c': No such file or directory 1>uncompr.c 1>c1 : fatal error C1083: Cannot open source file: 'src\uncompr.c': No such file or directory 1>zutil.c 1>c1 : fatal error C1083: Cannot open source file: 'src\zutil.c': No such file or directory 1>Done building project "zlib.vcxproj" -- FAILED.

2>------ Build started: Project: libpng, Configuration: Release Unicode Win32 ------ 2>O sistema não pode encontrar o caminho especificado. 2>C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: The command "IF NOT EXIST "C:\Users\ellus\Downloads\snes9x-master\win32\libpng\src\scripts\pnglibconf.h" ( 2>C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: COPY "C:\Users\ellus\Downloads\snes9x-master\win32\libpng\src\scripts\pnglibconf.h.prebuilt" "C:\Users\ellus\Downloads\snes9x-master\win32\libpng\src\pnglibconf.h" 2>C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: ) 2>C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: :VCEnd" exited with code 1. 2>Done building project "libpng.vcxproj" -- FAILED.

3>------ Build started: Project: snes9x, Configuration: Release Unicode Win32 ------ 3>apu.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>sdsp.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>smp.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>smp_state.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>bsx.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>c4.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>c4emu.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>cheats.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>cheats2.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>clip.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>conffile.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>controls.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>cpu.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>cpuexec.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>cpuops.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>crosshairs.cpp 3>c:\users\ellus\downloads\snes9x-master\crosshairs.cpp(8): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>debug.cpp 3>dma.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>dsp.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>dsp1.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>Compiling... 3>dsp2.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>dsp3.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>dsp4.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>2xsai.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>blit.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>epx.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>hq2x.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>xbrz.cpp 3>fxemu.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>fxinst.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>gfx.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>globals.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>7zlzma.cpp 3>s9x-jma.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>winout.cpp 3>loadzip.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>logger.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>memmap.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>movie.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>msu1.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>Compiling... 3>netplay.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>obc1.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>ppu.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>sa1.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>sa1cpu.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>screenshot.cpp 3>c:\users\ellus\downloads\snes9x-master\screenshot.cpp(8): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>sdd1.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>sdd1emu.cpp 3>server.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>seta.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>seta010.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>seta011.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>seta018.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>glsl.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>shader_helpers.cpp 3>c:\users\ellus\downloads\snes9x-master\shaders\shader_helpers.cpp(7): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>snapshot.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>snes9x.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>spc7110.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>srtc.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>statemanager.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>Compiling... 3>sha256.cpp 3>stream.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>tile.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>AVIOutput.cpp 3>CCGShader.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>CD3DCG.cpp 3>c:\users\ellus\downloads\snes9x-master\win32\cd3dcg.h(17): fatal error C1083: Cannot open include file: 'DirectXMath/Inc/DirectXMath.h': No such file or directory 3>CDirect3D.cpp 3>c:\users\ellus\downloads\snes9x-master\win32\cd3dcg.h(17): fatal error C1083: Cannot open include file: 'DirectXMath/Inc/DirectXMath.h': No such file or directory 3>CDirectDraw.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>CDirectSound.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>cgFunctions.cpp 3>CGLCG.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>COpenGL.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>CShaderParamDlg.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>CXAudio2.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>image_functions.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>render.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>wconfig.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>win32.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>win32_display.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>win32_sound.cpp 3>c:\users\ellus\downloads\snes9x-master\snes9x.h(19): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>Compiling... 3>wsnes9x.cpp 3>c:\users\ellus\downloads\snes9x-master\unzip\unzip.h(53): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory 3>Done building project "snes9xw.vcxproj" -- FAILED. ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

OV2 commented 5 years ago

If you've downloaded them manually you need to place the source files in zlib/src libpng/src. The offficial zip files of zlib/libpng contain an extra top-level folder with a version number, you need to place the contents of that folder in the appropriate src folder.

MurhafSousli commented 5 years ago

I am having the same issue, followed that .txt file and I could not build it, Isn't there a clear instruction?

Where do I get these missing files? shouldn't the source files be pre-included in the master branch?

1>------ Build started: Project: zlib, Configuration: Debug Unicode Win32 ------ 1>cl : Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release 1>zutil.c 1>c1 : fatal error C1083: Cannot open source file: 'src\zutil.c': No such file or directory 1>uncompr.c 1>c1 : fatal error C1083: Cannot open source file: 'src\uncompr.c': No such file or directory 1>trees.c 1>c1 : fatal error C1083: Cannot open source file: 'src\trees.c': No such file or directory 1>inftrees.c 1>c1 : fatal error C1083: Cannot open source file: 'src\inftrees.c': No such file or directory 1>inflate.c 1>c1 : fatal error C1083: Cannot open source file: 'src\inflate.c': No such file or directory 1>inffast.c 1>c1 : fatal error C1083: Cannot open source file: 'src\inffast.c': No such file or directory 1>infback.c 1>c1 : fatal error C1083: Cannot open source file: 'src\infback.c': No such file or directory 1>gzwrite.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzwrite.c': No such file or directory 1>gzread.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzread.c': No such file or directory 1>gzlib.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzlib.c': No such file or directory 1>gzclose.c 1>c1 : fatal error C1083: Cannot open source file: 'src\gzclose.c': No such file or directory 1>deflate.c 1>c1 : fatal error C1083: Cannot open source file: 'src\deflate.c': No such file or directory 1>crc32.c 1>c1 : fatal error C1083: Cannot open source file: 'src\crc32.c': No such file or directory 1>compress.c 1>c1 : fatal error C1083: Cannot open source file: 'src\compress.c': No such file or directory 1>adler32.c 1>c1 : fatal error C1083: Cannot open source file: 'src\adler32.c': No such file or directory 1>Generating Code... 1>Done building project "zlib.vcxproj" -- FAILED. 2>------ Build started: Project: libpng, Configuration: Debug Unicode Win32 ------ 2>The system cannot find the path specified. 2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: The command "IF NOT EXIST "C:\Users\Murhaf\Desktop\snes9x-master\win32\libpng\src\scripts\pnglibconf.h" ( 2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: COPY "C:\Users\Murhaf\Desktop\snes9x-master\win32\libpng\src\scripts\pnglibconf.h.prebuilt" "C:\Users\Murhaf\Desktop\snes9x-master\win32\libpng\src\pnglibconf.h" 2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: ) 2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: :VCEnd" exited with code 1. 2>Done building project "libpng.vcxproj" -- FAILED. 3>------ Build started: Project: snes9x, Configuration: Debug Unicode Win32 ------ 3>apu.cpp 3>c:\users\murhaf\desktop\snes9x-master\apu\hermite_resampler.h(95): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\apu\hermite_resampler.h(96): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\apu\apu.cpp(532): warning C4244: '=': conversion from 'double' to 'int', possible loss of data 3>sdsp.cpp 3>smp.cpp 3>smp_state.cpp 3>bsx.cpp 3>c4.cpp 3>c4emu.cpp 3>cheats.cpp 3>cheats2.cpp 3>clip.cpp 3>conffile.cpp 3>controls.cpp 3>cpu.cpp 3>cpuexec.cpp 3>cpuops.cpp 3>crosshairs.cpp 3>c:\users\murhaf\desktop\snes9x-master\crosshairs.cpp(8): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>debug.cpp 3>dma.cpp 3>dsp.cpp 3>dsp1.cpp 3>Generating Code... 3>Compiling... 3>dsp2.cpp 3>dsp3.cpp 3>dsp4.cpp 3>2xsai.cpp 3>blit.cpp 3>epx.cpp 3>hq2x.cpp 3>xbrz.cpp 3>fxemu.cpp 3>fxinst.cpp 3>gfx.cpp 3>globals.cpp 3>7zlzma.cpp 3>crc32.cpp 3>iiostrm.cpp 3>inbyte.cpp 3>jma.cpp 3>lzma.cpp 3>lzmadec.cpp 3>s9x-jma.cpp 3>Generating Code... 3>Compiling... 3>winout.cpp 3>loadzip.cpp 3>logger.cpp 3>memmap.cpp 3>movie.cpp 3>msu1.cpp 3>netplay.cpp 3>obc1.cpp 3>ppu.cpp 3>sa1.cpp 3>sa1cpu.cpp 3>screenshot.cpp 3>c:\users\murhaf\desktop\snes9x-master\screenshot.cpp(8): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>sdd1.cpp 3>sdd1emu.cpp 3>server.cpp 3>seta.cpp 3>seta010.cpp 3>seta011.cpp 3>seta018.cpp 3>glsl.cpp 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(621): warning C4244: '=': conversion from 'float' to 'GLuint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(624): warning C4244: '=': conversion from 'float' to 'GLuint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(627): warning C4244: '=': conversion from 'float' to 'GLuint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(636): warning C4244: '=': conversion from 'float' to 'GLuint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(639): warning C4244: '=': conversion from 'float' to 'GLuint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(642): warning C4244: '=': conversion from 'float' to 'GLuint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(935): warning C4244: 'argument': conversion from 'float' to 'GLint', possible loss of data 3>c:\users\murhaf\desktop\snes9x-master\shaders\glsl.cpp(936): warning C4244: 'argument': conversion from 'float' to 'GLint', possible loss of data 3>Generating Code... 3>Compiling... 3>shader_helpers.cpp 3>c:\users\murhaf\desktop\snes9x-master\shaders\shader_helpers.cpp(7): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>snapshot.cpp 3>snes9x.cpp 3>spc7110.cpp 3>c:\users\murhaf\desktop\snes9x-master\spc7110dec.cpp(133): warning C4805: '&': unsafe mix of type 'unsigned int' and type 'bool' in operation 3>c:\users\murhaf\desktop\snes9x-master\spc7110dec.cpp(226): warning C4805: '&': unsafe mix of type 'unsigned int' and type 'bool' in operation 3>c:\users\murhaf\desktop\snes9x-master\spc7110dec.cpp(333): warning C4805: '&': unsafe mix of type 'unsigned int' and type 'bool' in operation 3>srtc.cpp 3>statemanager.cpp 3>sha256.cpp 3>bml.cpp 3>stream.cpp 3>tile.cpp 3>AVIOutput.cpp 3>CCGShader.cpp 3>CD3DCG.cpp 3>c:\users\murhaf\desktop\snes9x-master\win32\cd3dcg.h(17): fatal error C1083: Cannot open include file: 'DirectXMath/Inc/DirectXMath.h': No such file or directory 3>CDirect3D.cpp 3>c:\users\murhaf\desktop\snes9x-master\win32\cd3dcg.h(17): fatal error C1083: Cannot open include file: 'DirectXMath/Inc/DirectXMath.h': No such file or directory 3>CDirectDraw.cpp 3>CDirectSound.cpp 3>cgFunctions.cpp 3>CGLCG.cpp 3>c:\users\murhaf\desktop\snes9x-master\win32\cglcg.cpp(11): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>COpenGL.cpp 3>CShaderParamDlg.cpp 3>Generating Code... 3>Compiling... 3>CXAudio2.cpp 3>DumpAtEnd.cpp 3>dxerr.cpp 3>image_functions.cpp 3>c:\users\murhaf\desktop\snes9x-master\win32\image_functions.cpp(3): fatal error C1083: Cannot open include file: 'png.h': No such file or directory 3>InputCustom.cpp 3>render.cpp 3>wconfig.cpp 3>win32.cpp 3>win32_display.cpp 3>c:\users\murhaf\desktop\snes9x-master\win32\cd3dcg.h(17): fatal error C1083: Cannot open include file: 'DirectXMath/Inc/DirectXMath.h': No such file or directory 3>win32_sound.cpp 3>wsnes9x.cpp 3>_tfwopen.cpp 3>Generating Code... 3>Done building project "snes9xw.vcxproj" -- FAILED. ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

OV2 commented 5 years ago

zlib, libpng and directxmath are their own projects and are referenced as git submodules. You can automatically download them by using "git submodule update --init".

MurhafSousli commented 5 years ago

@OV2 Thanks for the quick reply! I've downloaded them manually and put them in the right places, libpng and zlib builds successfully, But now snes9x project produces the following

1>------ Build started: Project: snes9x, Configuration: Debug Unicode Win32 ------ 1>crosshairs.cpp 1>screenshot.cpp 1>shader_helpers.cpp 1>CD3DCG.cpp 1>CGLCG.cpp 1>image_functions.cpp 1>Generating Code... 1>ioapi.c 1>iowin32.c 1>mztools.c 1>unzip.c 1>zip.c 1>gl_core_3_1.c 1>snes_ntsc.c 1>Generating Code... 1>libpng.lib(png.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:REF' specification 1>conffile.obj : error LNK2019: unresolved external symbol impgzclose referenced in function "public: bool thiscall ConfigFile::LoadFile(char const )" (?LoadFile@ConfigFile@@QAE_NPBD@Z) 1>snes9x.obj : error LNK2001: unresolved external symbol impgzclose 1>stream.obj : error LNK2001: unresolved external symbol impgzclose 1>conffile.obj : error LNK2019: unresolved external symbol impgzopen referenced in function "public: bool __thiscall ConfigFile::LoadFile(char const )" (?LoadFile@ConfigFile@@QAE_NPBD@Z) 1>memmap.obj : error LNK2001: unresolved external symbol impgzopen 1>snes9x.obj : error LNK2001: unresolved external symbol impgzopen 1>stream.obj : error LNK2001: unresolved external symbol impgzopen 1>stream.obj : error LNK2019: unresolved external symbol impgzdopen referenced in function "class Stream * cdecl reopenStreamFromFd(int,char const )" (?reopenStreamFromFd@@YAPAVStream@@HPBD@Z) 1>stream.obj : error LNK2019: unresolved external symbol impgzread referenced in function "public: virtual unsigned int __thiscall fStream::read(void ,unsigned int)" (?read@fStream@@UAEIPAXI@Z) 1>stream.obj : error LNK2019: unresolved external symbol impgzwrite referenced in function "public: virtual unsigned int thiscall fStream::write(void *,unsigned int)" (?write@fStream@@UAEIPAXI@Z) 1>stream.obj : error LNK2019: unresolved external symbol impgzgets referenced in function "public: virtual char * thiscall fStream::gets(char *,unsigned int)" (?gets@fStream@@UAEPADPADI@Z) 1>stream.obj : error LNK2019: unresolved external symbol impgzgetc referenced in function "public: virtual int thiscall fStream::get_char(void)" (?get_char@fStream@@UAEHXZ) 1>stream.obj : error LNK2019: unresolved external symbol impgzseek referenced in function "public: virtual unsigned int thiscall fStream::size(void)" (?size@fStream@@UAEIXZ) 1>stream.obj : error LNK2019: unresolved external symbol impgztell referenced in function "public: virtual unsigned int thiscall fStream::pos(void)" (?pos@fStream@@UAEIXZ) 1>unzip.obj : error LNK2019: unresolved external symbol impinflate referenced in function _unzReadCurrentFile 1>libpng.lib(pngrutil.obj) : error LNK2001: unresolved external symbol impinflate 1>unzip.obj : error LNK2019: unresolved external symbol impinflateEnd referenced in function _unzCloseCurrentFile 1>libpng.lib(pngread.obj) : error LNK2001: unresolved external symbol impinflateEnd 1>unzip.obj : error LNK2019: unresolved external symbol impcrc32 referenced in function unzReadCurrentFile 1>zip.obj : error LNK2001: unresolved external symbol impcrc32 1>libpng.lib(png.obj) : error LNK2001: unresolved external symbol impcrc32 1>unzip.obj : error LNK2019: unresolved external symbol impinflateInit2 referenced in function unzOpenCurrentFile3 1>libpng.lib(pngrutil.obj) : error LNK2001: unresolved external symbol impinflateInit2 1>unzip.obj : error LNK2019: unresolved external symbol impget_crc_table referenced in function _unzOpenCurrentFile3 1>zip.obj : error LNK2001: unresolved external symbol impget_crc_table 1>zip.obj : error LNK2019: unresolved external symbol impdeflate referenced in function _zipWriteInFileInZip 1>libpng.lib(pngwutil.obj) : error LNK2001: unresolved external symbol impdeflate 1>zip.obj : error LNK2019: unresolved external symbol impdeflateEnd referenced in function zipCloseFileInZipRaw 1>libpng.lib(pngwrite.obj) : error LNK2001: unresolved external symbol impdeflateEnd 1>libpng.lib(pngwutil.obj) : error LNK2001: unresolved external symbol impdeflateEnd 1>zip.obj : error LNK2019: unresolved external symbol impdeflateInit2 referenced in function zipOpenNewFileInZip4 1>libpng.lib(pngwutil.obj) : error LNK2001: unresolved external symbol impdeflateInit2 1>libpng.lib(png.obj) : error LNK2019: unresolved external symbol impinflateReset referenced in function _png_reset_zstream 1>libpng.lib(pngrutil.obj) : error LNK2001: unresolved external symbol impinflateReset 1>libpng.lib(png.obj) : error LNK2019: unresolved external symbol impadler32 referenced in function _png_compare_ICC_profile_with_sRGB 1>libpng.lib(pngwutil.obj) : error LNK2019: unresolved external symbol impdeflateReset referenced in function _png_deflate_claim 1>libpng.lib(pngrutil.obj) : error LNK2019: unresolved external symbol imp__inflateReset2 referenced in function _png_inflate_claim 1>C:\Users\Murhaf\Desktop\snes9x-master\win32\snes9x-debug.exe : fatal error LNK1120: 21 unresolved externals 1>Done building project "snes9xw.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

OV2 commented 5 years ago

That looks like zlib and libpng are built incorrectly (as a dll). Try doing a clean and then rebuilding all three projects.

DQ318 commented 5 years ago

Guys, all the tips helped a lot. Now everything is compiling correctly. They can close the Issue. Thanks to all!

MurhafSousli commented 5 years ago

I have this issue, I cannot get the XAudio2.h, I tried installing Windows SDK 10 but it didn't work

image

Any idea?

MurhafSousli commented 5 years ago

Finally worked after installing DXSDK_Jun10.exe