x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
Hugo Macpherson
Posts: 5
Joined: Thu Feb 10, 2022 12:12 am

x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by Hugo Macpherson »

Hello,

I would be very grateful if someone could kindly provide guidance to enable me to resolve the error message displayed in the Command Prompt window in the attached image. I have no knowledge of Visual Studio and installed only the Build Tools as advised in the Read Me text shown in the attached image specifically to access LuxCore Render, so please keep this in mind and assume I know nothing when composing your replies. Many thanks,

Visual Studio 2022 error message.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by Dade »

To start, the problem is in the space in "Program files" directory name, you need to use " around to tell Windows it is a single command and not 2. But just do has explained in the README:

1) "cd /d C:\Path\to\luxcorerender\WindowsCompile\" to set the current directory where LuxCore is;
2) ".\cmake-build-x64.bat" to start the build process.
Support LuxCoreRender project with salts and bounties
Hugo Macpherson
Posts: 5
Joined: Thu Feb 10, 2022 12:12 am

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by Hugo Macpherson »

Hello Dade,

Thank you for getting back to me. I have now gone back to the Visual Studio Installer to additionally install the CMake tools as the installation from https://cmake.org/ linked from the ReadMe file was not recognised. I think this counts as progress, however, I am embarrassed to say that information displayed in the x64 Native Tools Command Prompt stating 'Please make sure you've cloned the repositories so that they have the following structure' is not clear to me. Could you kindly clarify this?

For reference, at point 4 in the ReadMe instructions, as shown in the attached images, I followed both links to find the downloads. Possibly my error was here that prompted the above problem, but I am not familiar with these interfaces and would value your guidance.

Many thanks,

Hugo
Attachments
Visual Studio 2022 error message.png
LuxCore Download ZIP.png
WindowsCompile Download ZIP.png
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by acasta69 »

Hello,
as Dade has already suggested, you are missing to apply step 5 of the README.txt.
You cannot call the cmake-build-x64.bat from any directory, it will not work.
You must call it from within the WindowsCompile directory, as explained at step 5.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
Hugo Macpherson
Posts: 5
Joined: Thu Feb 10, 2022 12:12 am

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by Hugo Macpherson »

Hello Acasta,

To the best of my understanding, I have followed the guidance in step 5 of the README.txt as shown in the attached image where I have typed the following into the x64 Native Tools Command Prompt for VS 2019:

"C:\Program Files\luxcorerender\WindowsCompile\.\cmake-build-x64.bat"

I do not know what to do next and would be very glad of further assistance.

Many thanks,

Hugo
Attachments
Visual Studio 2022 error message.png
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by acasta69 »

Hugo Macpherson wrote: Fri Feb 11, 2022 11:31 pm "C:\Program Files\luxcorerender\WindowsCompile\.\cmake-build-x64.bat"
This is not according to that step 5: you have collapsed two separate lines into one and forgot the beginning of the first line.
The first command should be

Code: Select all

cd C:\Program Files\luxcorerender\WindowsCompile
This will take you to the directory of your choice.
The second

Code: Select all

cmake-build-x64.bat
will run the actual build process (you can omit the initial ".\").

Just a side note that should not really affect your results:
the "C:\Program Files" directory in Windows systems is reserved for programs installed in the system. It is not recommended to put there other kind of stuff like working documents. For that, choosing a location under your "documents" folder would be better.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
Hugo Macpherson
Posts: 5
Joined: Thu Feb 10, 2022 12:12 am

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by Hugo Macpherson »

Hello Acasta,

Thank you again for your guidance. I am sorry to report that I have run into another error having followed, to the best of my knowledge, the instructions you provided previously. Please see the attached image. Please also note that the folders in the browser window do not correspond with the information in the x64 Native Tools Command Prompt. I apologise for these rudimentary questions which must be trying for you, but I do hope we can resolve this and would be grateful for your support.

Many thanks,

Hugo
Attachments
Visual Studio 2022 error message.png
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by acasta69 »

Ok, this is happening because either one of the used programs or our build script cannot properly handle the space in "C:\Program Files".
You can solve this by moving the whole "luxcorerender" folder out of "C:\Program Files" to a different location without spaces in the path name.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
Hugo Macpherson
Posts: 5
Joined: Thu Feb 10, 2022 12:12 am

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by Hugo Macpherson »

Hello and thanks for getting back to me.

I have moved the files out of the Program Files location. Implementing steps 1 to 5 in the README.txt generated the following information in the x64 Native Tools Command Prompt which I do not know how to resolve:

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:

The output was:
1
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 12/02/2022 16:10:59.
Project "C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(495,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(495,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]


"C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]

1 Warning(s)
1 Error(s)

Time Elapsed 00:00:02.11


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:

The output was:
1
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 12/02/2022 16:11:02.
Project "C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(495,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(495,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found. [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]


"C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\Tanya\Documents\luxcorerender\WindowsCompile\Build_CMake\LuxCore\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]

1 Warning(s)
1 Error(s)

Time Elapsed 00:00:01.59
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: x64 Native Tools Command Prompt for VS 2019 on Windows 10 Pro

Post by acasta69 »

This is a very strange, it look like something wrong in your Build Tools install.
Can you please check with Visual Studio Installer that you have at least one Windows 10 SDK installed?

Screenshot 2022-02-13 171732.png

It does not have to be the same that I have, but there should be at least one installed by default, otherwise you are missing something necessary to build programs.
If none is selected, add the latest Windows 10 SDK version in your list.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
Post Reply