ITK 5.0 DeformableRegistration15.cxx

(Sindhura C) #1

Im not able to build this file in Visual Studio 2109.
the following error arises. Please help me fix this issue

1>------ Build started: Project: itkv3p_netlib, Configuration: Debug x64 ------
2>------ Build started: Project: itkvnl, Configuration: Debug x64 ------
2>vnl_alloc.cxx
2>vnl_block.cxx
2>vnl_matlab_print_scalar.cxx
1>f77_aloc.c
2>vnl_matlab_read.cxx
1>cabs.c
1>d_imag.c
1>d_lg10.c
2>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\core\vnl\vnl_block.cxx : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\core\vnl\itkvnl.dir\Debug\itkvnl.pdb
1>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\libf2c\d_imag.c : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\itkv3p_netlib.dir\Debug\itkv3p_netlib.pdb
2>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\core\vnl\vnl_alloc.cxx : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\core\vnl\itkvnl.dir\Debug\itkvnl.pdb
1>d_sign.c
2>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\core\vnl\vnl_matlab_print_scalar.cxx : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\core\vnl\itkvnl.dir\Debug\itkvnl.pdb
1>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\libf2c\d_sign.c: fatal error C1041: cannot open program database 'C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\itkv3p_netlib.dir\Debug\itkv3p_netlib.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
1>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\libf2c\f77_aloc.c : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\itkv3p_netlib.dir\Debug\itkv3p_netlib.pdb
1>i_dnnt.c
1>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\libf2c\i_dnnt.c: fatal error C1041: cannot open program database 'C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\itkv3p_netlib.dir\Debug\itkv3p_netlib.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
1>pow_dd.c
1>cl : Command line error D8040 : error creating or communicating with child process
2>cl : Command line error D8040 : error creating or communicating with child process
1>C:\Program Files\VisualStudio2019\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
1>Done building project "itkv3p_netlib.vcxproj" -- FAILED.
2>C:\Program Files\VisualStudio2019\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
2>Done building project "itkvnl.vcxproj" -- FAILED.
3>------ Build started: Project: itkvnl_algo, Configuration: Debug x64 ------
3>vnl_ldl_cholesky.cxx
3>vnl_sparse_lu.cxx
3>vnl_generalized_schur.cxx
3>vnl_discrete_diff.cxx
3>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\core\vnl\algo\vnl_ldl_cholesky.cxx : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\core\vnl\algo\itkvnl_algo.dir\Debug\itkvnl_algo.pdb
3>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\core\vnl\algo\vnl_sparse_lu.cxx : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\core\vnl\algo\itkvnl_algo.dir\Debug\itkvnl_algo.pdb
3>C:\ITK-5\Modules\ThirdParty\VNL\src\vxl\core\vnl\algo\vnl_generalized_schur.cxx : fatal error C1090: PDB API call failed, error code '3': C:\ITK-5\build\Modules\ThirdParty\VNL\src\vxl\core\vnl\algo\itkvnl_algo.dir\Debug\itkvnl_algo.pdb
3>cl : Command line error D8040 : error creating or communicating with child process
3>C:\Program Files\VisualStudio2019\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
3>Done building project "itkvnl_algo.vcxproj" -- FAILED.
4>------ Build started: Project: DeformableRegistration15, Configuration: Debug x64 ------
4>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\itkvnl_algo-5.0.lib'
4>Done building project "DeformableRegistration15.vcxproj" -- FAILED.
========== Build: 0 succeeded, 4 failed, 90 up-to-date, 0 skipped ==========
(Dženan Zukić) #2

I encountered it too. Please up-vote if you have a Microsoft Visual Studio profile. Workaround is to add /FS to CMAKE_CXX_FLAGS when configuring ITK. On my computer it reads /DWIN32 /D_WINDOWS /W3 /GR /EHsc /FS.

1 Like