altona_wz4 + Windows 10 + Visual Studio 2015 = win
Hi, just tried to build this, but I ran into a few problems. It took a bit to figure it out, so the next person will have it easier.
- First generate the 2012 solution/project files normally
- Drag&drop the generated
G:\fr_public\altona_wz4\wz4\werkkzeug4\werkkzeug4.slnon Visual Studio 2015 - Either Visual Studio retargets it automatically, or if not, simply right click on
Solution 'werkkzeug4'and click on "Retarget" - Now open "base/types.hpp"
Rewrite this:
#define sCONFIG_NATIVEINT __int64 _w64
#define sCONFIG_INT64 __int64 _w64
to this, because _w64 doesn't exist in Visual Studio 2015:
#define sCONFIG_NATIVEINT __int64
#define sCONFIG_INT64 __int64
- You need the DX9 or DX11 headers and libs, which can be installed by running this: https://www.microsoft.com/en-us/download/details.aspx?id=6812
The DirectX setup will error with some short error message, but all the .lib files and header includes are saved on disc.
- Now we actually need to tell Visual Studio 2015 where to find the headers/libs:
Add to include search path:
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared
Add the lib search path, only needed for werkkzeug4 project:
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\ucrt\x64
First one was called, but fails, it needs "win32", not "Win32", case sensitive
1) yasm -Xvc -f Win32 -rnasm -pnasm -o release_dx9_Win32\incbin.obj incbin.asm
2) yasm -Xvc -f win32 -rnasm -pnasm -o release_dx9_Win32\incbin.obj incbin.asm
-
Add legacy_stdio_definitions.lib to werkkzeug4 project
-
The last problem is that Visual Studio doesn't allow overwriting the
newoperator "easily" anymore. But it works again by defining these two defines for every project (just select all, rightclick on options, C/C++ -> Preprocessor and set those two defines:
__PLACEMENT_NEW_INLINE
__PLACEMENT_VEC_NEW_INLINE
Otherwise the project will compile, but won't link, because two functions already have a body.
I guess this also works with Visual Studio 2017, but I didn't test it yet. Have fun xd
Thanks for this ... 👍
I get a error: "cannot convert argument 1 from 'sChar *' to 'const sChar *&'.
I get a error: "cannot convert argument 1 from 'sChar *' to 'const sChar *&'.
I think you can just remove the const from the function signature or do manual casting, which VS version do you use?