LINK : fatal error LNK1104: cannot open file 'tbb.lib' with MSVS 2022 and RelWithDebInfo

Hi!

Im currently running into a weird issue where

python build_scripts\build_usd.py d:\Temp\USD --build-variant relwithdebuginfo --usd-imaging --embree --examples

gives me a

LINK : fatal error LNK1104: cannot open file 'tbb.lib' [D:\temp\USD\build\OpenUSD\pxr\base\tf\tf.vcxproj]
ERROR: Failed to run 'cmake --build . --config RelWithDebInfo --target install -j 56' in d:\Temp\USD\build\OpenUSD.
See d:\Temp\USD\build\OpenUSD\log.txt for more details.

when building a fresh 25.5.1 version of OpenUSD I grabbed from https://github.com/PixarAnimationStudios/OpenUSD.git and cloned to d:\Temp\OpenUSD\, then following the recommended steps for MSVS 2022 with developer command prompt and the aforementioned script. CMake version 3.31.2 and Python 3.13.3 sitting at C:\Program Files\Python313\ if that matters.

That’s completely weird since I’m almost 100% sure I managed to build a RelWithDebInfo before successfully and even with that new clone a Release configuration works flawlessly.

I have attached the build log
log.zip (16.5 KB)
for your reference, for sure I’m missing something completely obvious but really can’t find out what it is. Thanks in advance for helping me out!

A clean build with --onetbb should help.

For

python build_scripts\build_usd.py d:\Temp\USD --build-variant relwithdebuginfo --usd-imaging --embree --examples --onetbb

I get the error: ERROR: Embree support cannot be enabled when building against oneTBB.

If I leave out --embree (not really necessary for now, I can live without the hdEmbree example) everything works. Still weird, I’m almost 100% sure I was able to build OpenUSD without the --onetbb option in “Release with Debug Info” configuration.

Why? Because I was running the hdEmbree render delegate example in the MSVS 2022 debugger.