Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.56k stars 216 forks source link

building project "thundersvm.vcxproj" -- FAILED. #175

Closed DavidRaphaelDaza closed 4 years ago

DavidRaphaelDaza commented 4 years ago

Hello everyone. I am following the steps for Windows here but for some reason I cannot build thundersvm.

I have the following: CMake - 3.16 Visual Studio Community - 16, 2019 CUDA - 10 gcc (MinGW.org GCC-6.3.0-1) 6.3.0

` 1>------ Build started: Project: thundersvm, Configuration: Debug x64 ------ 1>Auto build dll exports

1>thundersvm_generated_kernelmatrix_kernel.cu.obj : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in cmdparser.obj

1>thundersvm_generated_smo_kernel.cu.obj : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in cmdparser.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: int64 cdecl std::basic_streambuf<char,struct std::char_traits >::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: void __cdecl std::basic_ostream<char,struct std::char_traits >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits > & __cdecl std::basic_ostream<char,struct std::char_traits >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1>msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits >::clear(int,bool)" (?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in thundersvm_generated_kernelmatrix_kernel.cu.obj

1> Creating library C:/Program Files (x86)/thundersvm-master/lib/Debug/thundersvm.lib and object C:/Program Files (x86)/thundersvm-master/lib/Debug/thundersvm.exp

1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

1>C:\Program Files (x86)\thundersvm-master\bin\Debug\thundersvm.dll : fatal error LNK1169: one or more multiply defined symbols found

1>Done building project "thundersvm.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== `

edit: made the output more readable

Any ideas? What should I look into? Thanks in advance

QinbinLi commented 4 years ago

Hi, @AHarardLeap

Have you changed the instruction in the doc to cmake .. -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=TRUE -G "Visual Studio 16 2019 Win64" ? Also, there is a link that may be helpful.

DavidRaphaelDaza commented 4 years ago

Hello @GODqinbin , yes I have. I successfully installed thundersvm in another computer so now I'm wondering if there are instructions how to do a clean reinstall because I might have made a mistake the first time.

QinbinLi commented 4 years ago

Hi, @AHarardLeap

If you are using Windows, you can just delete the thundersvm directory to remove it.