The build script on Windows will try to call vcvarsall.bat, but it first tries to use older versions of visual studio that aren't able to compile 4coder out of the box. For example I have Visual Studio 2012 and Visual Studio 2017 installed, and the script uses VS2012 since it's the first version available in the list in setup_cl_generic.bat. But VS2012 doesn't compile 4coder out of the box.
So maybe put the versions that don't compile out of the box last in the list ? For reference VS2012 is Visual Studio 11.
Another change would be to add some quotes around 2 lines to allow the script to work if there is a space in folder path.
The script will still fail if there is a space and it needs to call setup_cl_x64.bat though. Similarly if the path contains ( or ), the call to setup_cl_x64.bat will fail. But I can't seem to figure those one out.
The text was updated successfully, but these errors were encountered:
I was wondering why the space and parenthesis in setup_cl_generic.bat didn't cause any problems. It turns out we just need to add an extra set of parenthesis in the line that calls setup_cl_x64.bat.
There is yet another issue. If setup_cl_x64.bat calls vcvarsall.bat from Visual Studio 2017 (and newer I suppose), the working directory will be set to C:\users\user_name\source. That means that if you want to specify a filename to compile to the build script, you would need to specify an absolute path. And that the build will happen in the wrong location (maybe ?).
This can be fix by "calling" the drive letter after calling setup_cl_x64.bat. Calling cd %location% doesn't work since on Windows you can't use cd to change directory between drives.
mrmixer commentedMay 15, 2020
The build script on Windows will try to call vcvarsall.bat, but it first tries to use older versions of visual studio that aren't able to compile 4coder out of the box. For example I have Visual Studio 2012 and Visual Studio 2017 installed, and the script uses VS2012 since it's the first version available in the list in setup_cl_generic.bat. But VS2012 doesn't compile 4coder out of the box.
So maybe put the versions that don't compile out of the box last in the list ? For reference VS2012 is Visual Studio 11.
Another change would be to add some quotes around 2 lines to allow the script to work if there is a space in folder path.
On line 27
On line 39
The script will still fail if there is a space and it needs to call
setup_cl_x64.batthough. Similarly if the path contains(or), the call tosetup_cl_x64.batwill fail. But I can't seem to figure those one out.The text was updated successfully, but these errors were encountered: