Autodesk / Aurora

Real-time GPU path tracing with an OpenUSD Hydra render delegate
Apache License 2.0
506 stars 31 forks source link

"mismatch detected" building Debug version #10

Closed ohmaya closed 1 year ago

ohmaya commented 1 year ago

cmake --build Build --config Debug

Aurora.vcxproj -> E:\dp\Sft\GDev\ADSK\Aurora\Build\bin\Debug\Aurora.dll gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in TestHelpers.obj [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\AuroraInternals\AuroraInternalsTests.vcxproj] gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in TestHelpers.obj [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\AuroraInternals\AuroraInternalsTests.vcxproj] Creating library E:/dp/Sft/GDev/ADSK/Aurora/Build/lib/Debug/AuroraInternalsTests.lib and object E:/dp/Sft/GDev/ADSK/Aurora/Build/lib/Debug/AuroraInternalsTests.exp LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\AuroraInternals\AuroraInternalsTests.vcxproj] E:\dp\Sft\GDev\ADSK\Aurora\Build\bin\Debug\AuroraInternalsTests.exe : fatal error LNK1319: 2 mismatches detected [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\AuroraInternals\AuroraInternalsTests.vcxproj] gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in TestHelpers.obj [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Aurora\AuroraTests.vcxproj] gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in TestHelpers.obj [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Aurora\AuroraTests.vcxproj] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Aurora\AuroraTests.vcxproj] E:\dp\Sft\GDev\ADSK\Aurora\Build\bin\Debug\AuroraTests.exe : fatal error LNK1319: 2 mismatches detected [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Aurora\AuroraTests.vcxproj] gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in TestHelpers.obj [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Foundation\FoundationTests.vcxproj] gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in TestHelpers.obj [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Foundation\FoundationTests.vcxproj] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Foundation\FoundationTests.vcxproj] E:\dp\Sft\GDev\ADSK\Aurora\Build\bin\Debug\FoundationTests.exe : fatal error LNK1319: 2 mismatches detected [E:\dp\Sft\GDev\ADSK\Aurora\Build\Tests\Foundation\FoundationTests.vcxproj] Plasma.vcxproj -> E:\dp\Sft\GDev\ADSK\Aurora\Build\bin\Debug\Plasma.exe LINK : fatal error LNK1104: cannot open file 'tbb_debug.lib' [E:\dp\Sft\GDev\ADSK\Aurora\Build\Libraries\HdAurora\hdAurora.vcxproj]

I cannot find "_ITERATOR_DEBUG_LEVEL" in the VS solution.

PaddiM commented 1 year ago

Hi,

please check if you link to a gtest debug version. This error is typical for mixing debug and release libs.

ohmaya commented 1 year ago

please check if you link to a gtest debug version. This error is typical for mixing debug and release libs.

Basically, I was following https://github.com/Autodesk/Aurora#building-aurora in 2 passes, 1st with Release, then with Debug.

ohmaya commented 1 year ago

Some issues in Libraries\Aurora which is a test.

Cleaned AuroraExternals and Aurora\Build and it works.

andy-shiue-autodesk commented 1 year ago

Actually you only need to remove Build. There may be some mixup in your Build\ after running release and then debug. You can avoid this issue with separated Build\ (for example, Build-debug\ and Build-release). We are working on the multi-config support for Visual Studio right now. This issue will be gone with the multi-config support.

andy-shiue-autodesk commented 1 year ago

Closed as issue is solved with clean rebuild.

ohmaya commented 1 year ago

Build-debug\ and Build-release

This might affect deployHdAurora.py?