gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
385 stars 122 forks source link

build error on windows with VS2015: mismathc detected for... #120

Closed lujaindong closed 7 years ago

lujaindong commented 7 years ago

I have met another problem as follows: Error 2 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in version.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\gtest.lib(gtest-all.obj) version-test Error 3 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in gauss_transform.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\cpd.lib(utils.obj) gauss_transform-test Error 4 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in utils.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\cpd.lib(utils.obj) utils-test Error 5 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in nonrigid.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\cpd.lib(utils.obj) nonrigid-test Error 6 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in affine.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\cpd.lib(matrix.obj) affine-test Error 7 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in affine.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\cpd.lib(utils.obj) affine-test Error 8 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in gauss_transform.obj F:\Deformation and Correction\CPD_registration\cpd-build\tests\cpd.lib(gauss_transform.obj) gauss_transform-test

Any idea? Thanks in advance. Besides, does CPD be not suitable to be compiled on windows?

gadomski commented 7 years ago

Did you set gtest_force_shared_crt=ON in your CMake configuration?

CPD is tested on AppVeyor and so is expected to work on Windows. However, it is not used often there, so issues like #119 are not surprising. Your exercise of CPD on a Windows system is valuable, thank you!

lujaindong commented 7 years ago

yes, you are right! Now it can be built successfully. Thanks very much!