Description: LibreOffice SDK setsdkenv_windows.bat assumes wrong position of VCVARS32.bat, and can not run the batch file needed to set up MSVC compiler. Also, for x64 systems, vcvars64.bat should be used instead of vcvars32.bat. I use Visual Studio 2022, and the latest LO source code to build ODK. Steps to Reproduce: 1. Build LibreOffice from SDK on Windows x64 using Cygwin with --enable-odk 2. Invoke these commands in Cygwin: $ cd instdir/sdk $ ./setsdkenv_windows.bat 3. Enter details of the system configuration Actual Results: Error for being unable to run VCVARS32.bat. LibreOffice SDK setsdkenv_windows.bat assumes wrong position of VCVARS32.bat. With C++ compiler (cl.exe) located in: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64 It gives error message: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\VCVARS32.bat"' is not recognized as an internal or external command, operable program or batch file. The VCVARS32.bat is located here, alongside vcvars64.bat, which should be the correct choice for x64 systems: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build The error is generated each time, either the first time configuration, and afterwards. Expected Results: Configuration details: ****************************************************************** * * You have to configure your SDK environment first before you can * use it. The configuration has to be done only once. * ****************************************************************** *** Configure your SDK environment *** NOTE: This script is working only for Windows 2000, Windows XP or newer versions! Enter the Office Software Development Kit directory [C:\cygwin64\home\user\lode\dev\core\instdir\sdk]: Enter the Office base installation directory [C:\Program Files\LibreOffice]: Enter GNU make (3.79.1 or higher) tools directory []:c:\cygwin64\bin Enter a zip (2.3 or higher) tools directory []:c:\cygwin64\bin Enter a cat (2.0 or higher) tools directory []:c:\cygwin64\bin Enter a sed (3.02 or higher) tools directory []:c:\cygwin64\bin Enter the directory of the C++ compiler (optional) []:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build Error: Could not find the C++ compiler "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\cl.exe". Do you want to skip the choice of the C++ compiler (YES/NO) [YES]:NO Enter the directory of the C++ compiler (optional) []:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64 Enter the directory of the C# and VB.NET compilers (optional) [C:\Windows\Microsoft.NET\Framework64\v2.0.50727]: Enter JAVA SDK (1.6 or higher) installation directory (optional) []:C:\jdk Default output directory is the "c:\libreoffice24.2_sdk". Enter an existent directory if you prefer a different one. But note that only a path without spaces is allowed because of a limitation of gnu make. (optional) [c:\libreoffice24.2_sdk]: Automatic deployment of UNO components (YES/NO) [YES]: ****************************************************************** * ... "C:\Users\user\AppData\Roaming\libreoffice24.2_sdk\setsdkenv_windows.bat" * batch file has been prepared. * This batch file will be used in the future to prepare your * personal configured SDK environment. ****************************************************************** '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\VCVARS32.bat"' is not recognized as an internal or external command, operable program or batch file. ****************************************************************** * * SDK environment is prepared for Windows * * SDK = C:\cygwin64\home\user\lode\dev\core\instdir\sdk * Office = C:\Program Files\LibreOffice * Make = c:\cygwin64\bin * Zip = c:\cygwin64\bin * cat = c:\cygwin64\bin * sed = c:\cygwin64\bin * C++ Compiler = C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64 * C# and VB.NET compilers = C:\Windows\Microsoft.NET\Framework64\v2.0.50727 * Java = C:\jdk * Special Output directory = c:\libreoffice24.2_sdk * Auto deployment = YES * ****************************************************************** Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e7f486f10fd21bee78dea0d2eda241dd094d783d CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_DE); UI: en-US Calc: CL threaded
(In reply to Hossein from comment #0) > Description: > LibreOffice SDK setsdkenv_windows.bat assumes wrong position of > VCVARS32.bat, and can not run the batch file needed to set up MSVC compiler. > Also, for x64 systems, vcvars64.bat should be used instead of vcvars32.bat. > > I use Visual Studio 2022, and the latest LO source code to build ODK. Yes, the layout of those VS installations apparently changed over time, and the LO SDK would need to be adapted to also cope with such newer VS installations.