# Fail to build ROOT on Windows 10

**URL:** <https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451>\
**Category:** ROOT\
**Created:** [April 3, 2022, 9:17am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451 "2022-04-03T09:17:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bogomyag](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bogomyag](https://root-forum.cern.ch/u/bogomyag)\
**Post date:** [April 3, 2022, 9:17am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/1 "2022-04-03T09:17:44Z")

</div>

* * *

_ROOT Version:_ 6.26.00  
Platform: WINDOWS 10  
_Compiler:_ MSVC 19.29.30141.0

* * *

Hello,  
I am building root because I need FFTW.

I downloaded the source

```auto
git clone https://github.com/root-project/root.git root_6.26.00_src

```

then in x86 Native Tools Command Prompt for VS 2019

```auto
cmake -G "Visual Studio 16 2019" -A Win32 -Thost=x64 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_STANDARD=14 -Droofit=ON -Dfftw3=ON -DFFTW_INCLUDE_DIR=D:\fftw -DFFTW_LIBRARY=D:\fftw\libfftw3-3.lib D:\root_6.26.00_src > ..\cmake-output-1-26.00.txt

```

no errors,  
then actual building

```auto
cmake --build . --config Release > ..\cmake-build-1-26.00.txt

```

and there are warnings and errors

```auto
"D:\root_6.26.00_build\core\rootcling_stage1\rootcling_stage1.vcxproj" (default target) (178) ->
(Link target) -> 
  LINK : warning LNK4217: symbol '?gReadRules@ROOT@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@@std@@@2@@std@@A (class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > > > > > ROOT::gReadRules)' defined in 'RConversionRuleParser.obj' is imported by 'TClingUtils.obj' in function '"void __cdecl ROOT::TMetaUtils::WriteClassInit(class std::basic_ostream<char,struct std::char_traits<char> > &,class ROOT::TMetaUtils::AnnotatedRecordDecl const &,class clang::CXXRecordDecl const *,class cling::Interpreter const &,class ROOT::TMetaUtils::TNormalizedCtxt const &,class std::list<class ROOT::TMetaUtils::RConstructorType,class std::allocator<class ROOT::TMetaUtils::RConstructorType> > const &,bool &)" (?WriteClassInit@TMetaUtils@ROOT@@YAXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@ABVAnnotatedRecordDecl@12@PBVCXXRecordDecl@clang@@ABVInterpreter@cling@@ABVTNormalizedCtxt@12@ABV?$list@VRConstructorType@TMetaUtils@ROOT@@V?$allocator@VRConstructorType@TMetaUtils@ROOT@@@std@@@4@AA_N@Z)' [D:\root_6.26.00_build\core\rootcling_stage1\rootcling_stage1.vcxproj]
  LINK : warning LNK4286: symbol '?gReadRules@ROOT@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@@std@@@2@@std@@A (class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > > > > > ROOT::gReadRules)' defined in 'RConversionRuleParser.obj' is imported by 'rootcling_impl.obj' [D:\root_6.26.00_build\core\rootcling_stage1\rootcling_stage1.vcxproj]
  LINK : warning LNK4217: symbol '?gReadRawRules@ROOT@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@@std@@@2@@std@@A (class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > > > > > ROOT::gReadRawRules)' defined in 'RConversionRuleParser.obj' is imported by 'TClingUtils.obj' in function '"void __cdecl ROOT::TMetaUtils::WriteClassInit(class std::basic_ostream<char,struct std::char_traits<char> > &,class ROOT::TMetaUtils::AnnotatedRecordDecl const &,class clang::CXXRecordDecl const *,class cling::Interpreter const &,class ROOT::TMetaUtils::TNormalizedCtxt const &,class std::list<class ROOT::TMetaUtils::RConstructorType,class std::allocator<class ROOT::TMetaUtils::RConstructorType> > const &,bool &)" (?WriteClassInit@TMetaUtils@ROOT@@YAXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@ABVAnnotatedRecordDecl@12@PBVCXXRecordDecl@clang@@ABVInterpreter@cling@@ABVTNormalizedCtxt@12@ABV?$list@VRConstructorType@TMetaUtils@ROOT@@V?$allocator@VRConstructorType@TMetaUtils@ROOT@@@std@@@4@AA_N@Z)' [D:\root_6.26.00_build\core\rootcling_stage1\rootcling_stage1.vcxproj]
  LINK : warning LNK4286: symbol '?gReadRawRules@ROOT@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$list@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@V?$allocator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@2@@2@@std@@@2@@std@@A (class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::list<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > > > > > ROOT::gReadRawRules)' defined in 'RConversionRuleParser.obj' is imported by 'rootcling_impl.obj' [D:\root_6.26.00_build\core\rootcling_stage1\rootcling_stage1.vcxproj]

"D:\root_6.26.00_build\ALL_BUILD.vcxproj" (default target) (1) ->
"D:\root_6.26.00_build\graf2d\asimage\G__ASImage.vcxproj" (default target) (175) ->
"D:\root_6.26.00_build\core\Core.vcxproj" (default target) (176) ->
  D:\anaconda3\Library\lib\z.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' [D:\root_6.26.00_build\core\Core.vcxproj]
  D:\anaconda3\Library\lib\zstd.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' [D:\root_6.26.00_build\core\Core.vcxproj]

"D:\root_6.26.00_build\ALL_BUILD.vcxproj" (default target) (1) ->
"D:\root_6.26.00_build\graf2d\asimage\G__ASImage.vcxproj" (default target) (175) ->
"D:\root_6.26.00_build\core\Core.vcxproj" (default target) (176) ->
(Link target) -> 
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_versionNumber referenced in function _R__unzipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_isError referenced in function _R__unzipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_getErrorName referenced in function _R__unzipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_createCCtx referenced in function _R__zipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_freeCCtx referenced in function _R__zipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_compressCCtx referenced in function _R__zipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_createDCtx referenced in function _R__unzipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_freeDCtx referenced in function _R__unzipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  ZipZSTD.obj : error LNK2019: unresolved external symbol _ZSTD_decompressDCtx referenced in function _R__unzipZSTD [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _deflate referenced in function _R__zipMultipleAlgorithm [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _deflateEnd referenced in function _R__zipMultipleAlgorithm [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _inflate referenced in function _R__unzip [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _inflateEnd referenced in function _R__unzip [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _crc32 referenced in function _R__crc32 [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _deflateInit_ referenced in function _R__zipMultipleAlgorithm [D:\root_6.26.00_build\core\Core.vcxproj]
  RZip.obj : error LNK2019: unresolved external symbol _inflateInit_ referenced in function _R__unzip [D:\root_6.26.00_build\core\Core.vcxproj]
  D:\root_6.26.00_build\bin\libCore.dll : fatal error LNK1120: 16 unresolved externals [D:\root_6.26.00_build\core\Core.vcxproj]

```

The advice from Bertrand to my previous post from October 2020 does not help.

[Building root on windows 10 again - ROOT - ROOT Forum (cern.ch)](https://root-forum.cern.ch/t/building-root-on-windows-10-again/41895)

Any help?

The output of cmake and configuration of VS are attached.  
I tried with the latest Visual Studio 2022 with no success.

[vsconfig.txt](https://root-forum.cern.ch/uploads/short-url/kHA8ysgueBYr6qOHY3SMmV4Iw9e.txt) (1.6 KB)  
[cmake-output-1-26.00.txt](https://root-forum.cern.ch/uploads/short-url/oAuTuPMQ0OTcO4eJtymj36g23tS.txt) (11.2 KB)  
[cmake-build-1-26.00.txt](https://root-forum.cern.ch/uploads/short-url/luDalKhf0JCd2fP0c7fTSG6lc1T.txt) (1.3 MB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 4, 2022, 7:32am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/2 "2022-04-04T07:32:24Z")

</div>

Hi,

Don’t worry about the warnings. This error:

> [@bogomyag](#):
>
> ```auto
> D:\anaconda3\Library\lib\z.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' [D:\root_6.26.00_build\core\Core.vcxproj]
> D:\anaconda3\Library\lib\zstd.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' [D:\root_6.26.00_build\core\Core.vcxproj]
> 
> ```

This the cause of the problem. As you can see, it is the wrong architecture, and it should not be used at all. Please remove this lib from your lib path and use the built-in zlib (check with cmake-gui)

P.S. all the libraries from anaconda will most probably give problems.

```auto
-- Found ZLIB: D:/anaconda3/Library/lib/z.lib (found version "1.2.11") 
-- Looking for nlohmann/json.hpp
-- nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option
-- Looking for Freetype
-- Found Freetype: D:/anaconda3/Library/lib/freetype.lib (found version "2.10.4") 
... 

```

You can also try to build ROOT in 64 bit, but you might still have problems with those libraries…

---

<div class="post-metadata">

**Author:** ![bogomyag](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bogomyag](https://root-forum.cern.ch/u/bogomyag)\
**Post date:** [April 4, 2022, 10:19am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/3 "2022-04-04T10:19:06Z")

</div>

Thank you, Bertrand.  
I uninstalled ANACONDA and installed python from [https://www.python.org](https://www.python.org)  
ROOT was built without errors but fft.C tutorial does not work, other tutorials work fine.  
It complains about libFFTW.dll which exists in D:\root\_6.26.00\_build\bin  
I attached the output of cmake.  
The path to FFTW is set.

```auto
  ------------------------------------------------------------------
  | Welcome to ROOT 6.27/01 https://root.cern |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win32 on Apr 04 2022, 08:17:37 |
  | From heads/master@v6-25-02-911-g2a004822dc |
  | With MSVC 19.29.30141.0 |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

root [0] .q

D:\root_6.26.00_build\tutorials\fft>root -l FFT.C
root [0]
Processing FFT.C...
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 193: %1 is not a valid Win32 application.
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libFFTW.dll for TFFTRealComplex
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 193: %1 is not a valid Win32 application.
Error in <TVirtualFFT::FFT>: handler not found

```

[cmake-output-2-26.00.txt](https://root-forum.cern.ch/uploads/short-url/9EXwGsXNkLcuvJMZUKU1mvHJvVC.txt) (11.6 KB)  
[cmake-build-2-26.00.txt](https://root-forum.cern.ch/uploads/short-url/gCQj1I668i9nFIqgv1N8j9Tnahl.txt) (2.2 MB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 4, 2022, 10:31am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/4 "2022-04-04T10:31:54Z")

</div>

Add the location of `libfftw3-3.dll` to your PATH

---

<div class="post-metadata">

**Author:** ![bogomyag](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bogomyag](https://root-forum.cern.ch/u/bogomyag)\
**Post date:** [April 5, 2022, 3:43am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/5 "2022-04-05T03:43:36Z")

</div>

I have PATH to **libfftw3-3.dll** and it the file is there.

```auto
PS D:\root_6.26.00_build\tutorials\fft> $env:path -split ";"
C:\Program Files\Microsoft MPI\Bin\
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Windows\System32\OpenSSH\
C:\Program Files\PuTTY\
C:\Program Files\CMake\bin
C:\Program Files\Git\cmd
C:\Users\avbog\AppData\Local\Microsoft\WindowsApps
D:\texlive\2021\bin\win32
D:\Work\MAD8
D:\Work\MADX
D:\fftw
D:\root_6.26.00_build\bin
C:\Program Files\APS\SDDS ToolKit x64\
C:\Program Files\APS\Elegant x64\
C:\Program Files\APS\Elegant x64\MinGW

```

and still FFT.C fails

```auto
PS D:\root_6.26.00_build\tutorials\fft> root -l .\FFT.C
root [0]
Processing .\FFT.C...
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 193: %1 is not a valid Win32 application.
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libFFTW.dll for TFFTRealComplex
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 193: %1 is not a valid Win32 application.
Error in <TVirtualFFT::FFT>: handler not found

```

I did the .lib files for FFTW in x86 mode

```auto
     lib /def:libfftw3f-3.def
     lib /def:libfftw3-3.def
     lib /def:libfftw3l-3.def

```

If I did not have PATH to FFTW it would not have built, but the output of cmake says it found it.

Should I redo everything in x64 mode?  
Is there difference to build with VS2019 or VS2022?

Respectfully,  
Anton

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 5, 2022, 7:26am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/6 "2022-04-05T07:26:28Z")

</div>

> [@bogomyag](#):
>
> I did the .lib files for FFTW in x86 mode

Can you make sure the DLLs are 32 bit:

```auto
C:\libs\fftw\3.3.5>dumpbin /headers libfftw3-3.dll | findstr machine
             14C machine (x86)
                   32 bit word machine

```

And create the `.lib` from a `x86 Native Tools Command Prompt for VS 2019`

> [@bogomyag](#):
>
> If I did not have PATH to FFTW it would not have built, but the output of cmake says it found it.

FYI the `PATH` has nothing to do with the build, it’s only used to find DLLs when running. (building looks for the libs and don’t use the `PATH`)

> [@bogomyag](#):
>
> Should I redo everything in x64 mode?

No, everything must work in 32 bit (I build with FFTW since ages)

> [@bogomyag](#):
>
> Is there difference to build with VS2019 or VS2022?

No, there should be no difference.

Now can you run from a `x86 Native Tools Command Prompt for VS 2019`, and not in `PowerShell`, just to make sure?

---

<div class="post-metadata">

**Author:** ![bogomyag](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bogomyag](https://root-forum.cern.ch/u/bogomyag)\
**Post date:** [April 5, 2022, 12:17pm UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/7 "2022-04-05T12:17:06Z")

</div>

> [@bellenot](#):
>
> DLLs are 32 bit:

Thank you, Bertrand.  
The DLLs indeed were 64 bit. I changed to 32 bit and everything works.

Respectfully,  
Anton

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [April 19, 2022, 12:17pm UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-windows-10/49451/8 "2022-04-19T12:17:42Z")

</div>

Closed on April 19, 2022, 12:17pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
