FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
554 stars 107 forks source link

Can't build 0.19 on Windows — missing source files #250

Closed ma-choo closed 6 years ago

ma-choo commented 7 years ago

Trying to build 0.19 in VS 2013 on Windows 10 leads to this error log about missing source files.

1>------ Build started: Project: engine, Configuration: Debug Win32 ------
1>  touch.c
1>c1 : fatal error C1083: Cannot open source file: 'common\touch.c': No such file or directory
1>  sys_win.c
1>c1 : fatal error C1083: Cannot open source file: 'common\sys_win.c': No such file or directory
1>  events.c
1>c1 : fatal error C1083: Cannot open source file: 'common\sdl\events.c': No such file or directory
1>  keys.c
1>c1 : fatal error C1083: Cannot open source file: 'common\keys.c': No such file or directory
1>  joyinput.c
1>c1 : fatal error C1083: Cannot open source file: 'common\joyinput.c': No such file or directory
1>  input.c
1>c1 : fatal error C1083: Cannot open source file: 'common\input.c': No such file or directory
1>  gamma.c
1>c1 : fatal error C1083: Cannot open source file: 'common\gamma.c': No such file or directory
1>  console.c
1>c1 : fatal error C1083: Cannot open source file: 'common\console.c': No such file or directory
1>  s_backend.c
1>c1 : fatal error C1083: Cannot open source file: 'client\s_backend.c': No such file or directory
1>  gl_vidnt_common.c
1>c1 : fatal error C1083: Cannot open source file: 'client\gl_vidnt_common.c': No such file or directory
1>  gl_vidnt.c
1>c1 : fatal error C1083: Cannot open source file: 'client\gl_vidnt.c': No such file or directory
1>  Generating Code...
2>------ Build started: Project: game_launch, Configuration: Debug Win32 ------
2>xash.obj : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8 referenced in function _WinMain@16
2>D:\xash3d-0.19\Debug\xash.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 2 failed, 2 up-to-date, 0 skipped ==========

Some of these are in the wrong folders (tries to open from common\ when they're really in client\) but some are totally missing from entire solution (sys_win, s_backend, gl_vidnt).

A similar log seems to happen in the AppVeyor check https://ci.appveyor.com/project/a1batross/xash3d/build/job/wn656k3b2w1w68fk/messages

a1batross commented 7 years ago

Use CMake. I made it to working on WIndows too(without deployment).

ma-choo commented 7 years ago

I used cmake-gui to make a new VS2013 solution, but now I'm getting an unresolved external symbol _snprintf. crashhandler and objecthandler use snprintf functions that aren't defined anywhere.

Edit: Nevermind. I just had to put #define snprintf _snprintf where it was needed.

mittorn commented 7 years ago

You may use msvc6/build script for one-time builds, it should work with all VS versions.