LumaPictures / usd-qt

Reusable Qt Components for Pixar's USD
Other
153 stars 40 forks source link

Linking with static version of boost on Windows fails #37

Closed mateuszwojt closed 2 years ago

mateuszwojt commented 2 years ago

Hi,

I'm trying to compile usd-qt on Windows (MSVC 2015) using:

I'm using a static version of boost, I patched it using: set(Boost_USE_STATIC_LIBS ON) and I'm linking it explicitly using link_directories(${Boost_LIBRARIES})

but I'm getting some cryptic linker errors at the end of the process:

[100%] Linking CXX shared library _usdQt.pyd
LINK: command "C:\PROGRA~2\MICROS~1.0\VC\bin\X86_AM~1\link.exe /nologo @CMakeFiles\_usdQt.dir\objects1.rsp /out:_usdQt.p
yd /implib:_usdQt.lib /pdb:C:\dev\rnd\usd-qt\build\MSVC-2015\python-2.7\usd-qt-prefix\src\usd-qt-build\pxr\usdQt\_usdQt.
pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO -LIBPATH:C:\dev\rnd\usd-qt\build\MSVC-2015\python-2.7\usd-qt-prefix\s
rc\usd-qt\optimized -LIBPATH:C:\pkg_dev\boost\1.70.0\MSVC-2015\python-2.7\lib\libboost_python27-vc140-mt-x64-1_70.lib -L
IBPATH:C:\dev\rnd\usd-qt\build\MSVC-2015\python-2.7\usd-qt-prefix\src\usd-qt\debug -LIBPATH:C:\pkg_dev\boost\1.70.0\MSVC
-2015\python-2.7\lib\libboost_python27-vc140-mt-gd-x64-1_70.lib -LIBPATH:C:\pkg_dev\usd\21.05\MSVC-2015\python-2.7\lib S
:\pkg\python\2.7.18-1\platform-windows\libs\python27.lib C:\pkg_dev\usd\21.05\MSVC-2015\python-2.7\lib\tf.lib C:\pkg_dev
\usd\21.05\MSVC-2015\python-2.7\lib\sdf.lib C:\pkg_dev\usd\21.05\MSVC-2015\python-2.7\lib\vt.lib C:\pkg_dev\usd\21.05\MS
VC-2015\python-2.7\lib\pcp.lib C:\pkg_dev\usd\21.05\MSVC-2015\python-2.7\lib\arch.lib C:\pkg_dev\usd\21.05\MSVC-2015\pyt
hon-2.7\lib\usd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.
lib advapi32.lib /MANIFEST /MANIFESTFILE:_usdQt.pyd.manifest" failed (exit code 1104) with the following output:
jom: C:\dev\rnd\usd-qt\build\MSVC-2015\python-2.7\usd-qt-prefix\src\usd-qt-build\pxr\usdQt\CMakeFiles\_usdQt.dir\build.m
ake [pxr\usdQt\_usdQt.pyd] Error 2

Am I missing something?

mateuszwojt commented 2 years ago

I think I got it. I had two clashing builds of boost library installed on my machine and appended to the system path. Leaving a single version of the library fixed the issue. Closing.