Description
I get the following error when trying to pip install setup.py through Visual Studio 2022 :
"E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14.38. 33130\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:D:\OneDrive\GCAM model\GCAM 7. 0 New\gcam-core\exe" "/LIBPATH:D:\OneDrive\GCAM model\GCAM 7.0 New\gcam-core\libs\boost-libst\age\lib" "/LIBPATH:D:\OneDrive\GCAM model\GCAM 7.0 0 New\gcam-core\libs\tbb\lib\intel64\vc14" "/LIBPATH:C:\Program Files\Java\jdk-17.0. 2\lib" /LIBPATH:E:\Program\anaconda\libs /LIBPATH:E:\Program\anaconda /LIBPATH:E:\Program\anaconda\PCbuild\amd64 "/LIBPATH:E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14. 38.33130\ATLMFC\lib\x64" "/LIBPATH:E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14. 38.33130\lib\x64" "/LIBPATH:C:/Program Files (x86)/Windows Kits\10\lib\10.0.22621. 0ucrt\x64" "/LIBPATH:C:\Program Files (x86)/Windows Kits\10\lib\10.0.22621.0\um\x64" "/LIBPATH:E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14. 38.33130\ATLMFC\lib\x64" "/LIBPATH:E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14.38. 33130\lib\x64" "/LIBPATH:C:\Program Files (x86)/Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)/Windows Kits\10\lib\10. 0.22621.0\um\x64" "/LIBPATH:E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14.38.33130\binHostx64\x64\bin" gcam.lib hector.lib jvm.lib tbb.lib tbbmalloc.lib tbbmalloc_proxy.lib /EXPORT:PyInit_gcam_module build\temp. win-amd64-cpython-311\Release\src/gcam.obj build\temp.win-amd64-cpython-311\Release\src/get_data_helper.obj build\temp.win-amd64-cpython-311\Release\src/query_processor_base.obj build\temp.win-amd64-cpython-311\Release\src/set_data_helper. build\temp.win-amd64-cpython-311\Release\src/solution_debugger.obj /OUT:build\lib.win-amd64-cpython-311\gcam_module.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.lib
正在创建 build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.lib 和对象 build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.exp
get_data_helper.obj : error LNK2001: 无法解析的外部符号 "private: static class tbb::detail::d1::enumerable_thread_specific<double *,class tbb::detail::d1::cache_aligned_allocator<double *>,0> Value::sCentralValue" (? sCentralValue@Value@0V?$enumerable_thread_specific@PEANV?$cache_aligned_allocator@PEAN@d1@detail@tbb@@$0A@d1@detail@tbb@@A)
build\lib.win-amd64-cpython-311\gcam_module.cp311-win_amd64.pyd : fatal error LNK1120: 1 个无法解析的外部命令
error: command 'E:\Program\Microsoft Visual Studio\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe' failed with exit code 1120
This seems to be related to the TBB library, the tbb library I got from the https://github.com/oneapi-src/oneTBB/releases and I got the latest version 2021.11.0 from the website, and then the PATH was set to: \libs\tbb\lib\intel64\vc14
I've updated it with the changes to GCAM 7.0 in the Pull requests
What should I do to solve this problem?