Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

altona_wz4 + Windows 10 + Visual Studio 2015 = win #95

Open
kungfooman opened this issue Jun 20, 2018 · 3 comments
Open

altona_wz4 + Windows 10 + Visual Studio 2015 = win #95

kungfooman opened this issue Jun 20, 2018 · 3 comments

Comments

@kungfooman
Copy link

kungfooman commented Jun 20, 2018

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.

  1. First generate the 2012 solution/project files normally
  2. Drag&drop the generated G:\fr_public\altona_wz4\wz4\werkkzeug4\werkkzeug4.sln on Visual Studio 2015
  3. Either Visual Studio retargets it automatically, or if not, simply right click on Solution 'werkkzeug4' and click on "Retarget"
  4. 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
  1. 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.

  1. 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
  1. Add legacy_stdio_definitions.lib to werkkzeug4 project

  2. The last problem is that Visual Studio doesn't allow overwriting the new operator "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

@TRex22
Copy link

TRex22 commented Jun 28, 2018

Thanks for this ... 👍

@EGAMatsu
Copy link

I get a error: "cannot convert argument 1 from 'sChar *' to 'const sChar *&'.

@kungfooman
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants