user32.lib missing during build

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

user32.lib missing during build

Postby Jonas » Tue Oct 06, 2020 2:27 pm

I'm building 4147 for Windows using automate-git.py, and I'm getting an error message that user32.lib is missing. Does it come with the Windows 10 SDK? I installed the Debugging Tools. Do I need to install something else?
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: user32.lib missing during build

Postby Jonas » Tue Oct 06, 2020 6:19 pm

This is what I'm running:

set GN_DEFINES=is_official_build=true
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2
python .\automate-git.py --download-dir=.\download --branch=4147 --minimal-distrib --client-distrib --force-clean --x64-build
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: user32.lib missing during build

Postby magreenblatt » Tue Oct 06, 2020 6:39 pm

Did you install all dependencies mentioned here?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: user32.lib missing during build

Postby Jonas » Tue Oct 06, 2020 10:46 pm

I followed those instructions and that seemed to help somewhat.
Then I ran vcvarsall.bat in a VS developer shell, and re-ran automate-git.py from the same shell, like this:

Code: Select all
set WIN_CUSTOM_TOOLCHAIN=1
set CEF_VCVARS=none
set GYP_MSVS_OVERRIDE_PATH=%vs_root%
set VS_CRT_ROOT=%vs_crt_root%
set SDK_ROOT=%sdk_root%
set PATH=%sdk_root%\bin\%sdk_version%\x64;%vs_root%\VC\Tools\MSVC\%vc_tools_version%\bin\HostX64\x64;%vs_root%\VC\Redist\MSVC\%vc_redist_version%\x64\%vc_redist_crt%;%vs_root%\SystemCRT;%PATH%
set LIB=%sdk_root%\Lib\%sdk_version\um\%arch%;%sdk_root%\Lib\%sdk_version\ucrt\%arch%;%vs_root%\VC\Tools\MSVC\%vc_tools_version%\lib\%arch%;%vs_root%\VC\Tools\MSVC\%vc_tools_version%\atlmfc\lib\%arch%;%LIB%
set INCLUDE=%sdk_root%\Include\%sdk_version%\um;%sdk_root%\Include\%sdk_version%\ucrt;%sdk_root%\Include\%sdk_version%\shared;%vs_root%\VC\Tools\MSVC\%vc_tools_version%\include;%vs_root%\VC\Tools\MSVC\%vc_tools_version%\atlmfc\include;%INCLUDE%
set GN_DEFINES=is_official_build=true
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2
python .\automate-git.py --download-dir=.\download --branch=4147 --minimal-distrib --client-distrib --force-clean --x64-build


Now, I get this error:
Exception: GYP_MSVS_OVERRIDE_PATH environment variable must be set

I thought vsvarsall.bat sets %vs_root%, %sdk_root%, etc.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: user32.lib missing during build

Postby Jonas » Wed Oct 07, 2020 6:58 am

SInce I installed Windows 10 SDK to the default path I probably don't need to set GYP_MSVS_OVERRIDE_PATH and the others. So, I re-ran without like this:
Code: Select all
set GN_DEFINES=is_official_build=true
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2

python .\automate-git.py --download-dir=.\download --branch=4147 --minimal-distrib --client-distrib --force-clean --x64-build

But I'm back to the missing user32.lib. The script is looking in all these places and not finding it.
Code: Select all
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x86
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x86
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x86
C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x86
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86

I think I have a pretty standard install of VS and the SDK. I re-ran the VS installer with the arguments mentioned in the instructions. Then, I ran
Code: Select all
vcvars32.bat x64 10.0.17763.0

Finally, I ran the commands above.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: user32.lib missing during build

Postby magreenblatt » Wed Oct 07, 2020 9:33 am

You don’t need to run vcvars before building if you’ve installed Visual Studio and Windows SDK to the default locations. Start with a new cmd.exe shell, set GN_DEFINES and GYP_MSVS_VERSION, run cef_create_projects.bat, and check the out/Debug_GN_x64/environment.x64 file to see what paths Chromium has discovered.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: user32.lib missing during build

Postby Jonas » Wed Oct 07, 2020 10:48 am

Sorry, I can't find cef_create_projects.bat. I don't see any explanation on the wiki.

I found it on the web. It looks like it runs one command: python.bat tools\gclient_hook.py.
And, I found python.bat in depot_tools. I ran that, but it couldn't find tools\glicent_hook.py because there is no tools folder inside depot_tools.
Last edited by Jonas on Wed Oct 07, 2020 10:57 am, edited 1 time in total.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: user32.lib missing during build

Postby magreenblatt » Wed Oct 07, 2020 10:51 am

cef_create_projects.bat is part of the CEF checkout. You can find usage details here (step 7).
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: user32.lib missing during build

Postby Jonas » Thu Oct 08, 2020 7:18 am

It appears I was having trouble following the directions. Works like a charm. Thank you.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 37 guests