compiling error in windows(vs2019)
Whalesea-Gustav opened this issue · comments
Hello, I find your work is interesting and want to learn about shell generation and high-order mesh generation. I tried to compile the project in Windows with vs2019. I successfully used cmake to configure and generate vs2019 project, but met some problems when building the cumin_bin. I don`t know how to solve them. Can you help me? and can you give some instructions about runing the bichon project in Windows?
Hi,
Thanks for your interest in our work. I have tested on VS2020, which should work fine.
It is likely your problem is related to https://stackoverflow.com/questions/62370027/namespace-std-does-not-contain-optional, Can you try enable the flag /std:c++17
?
If you have any questions about our paper, don't hesitate to ask :)
Hi,
Thanks for your interest in our work. I have tested on VS2020, which should work fine.
It is likely your problem is related to https://stackoverflow.com/questions/62370027/namespace-std-does-not-contain-optional, Can you try enable the flag
/std:c++17
?If you have any questions about our paper, don't hesitate to ask :)
Hi,
Thanks for your interest in our work. I have tested on VS2020, which should work fine.
It is likely your problem is related to https://stackoverflow.com/questions/62370027/namespace-std-does-not-contain-optional, Can you try enable the flag
/std:c++17
?If you have any questions about our paper, don't hesitate to ask :)
I tried to add the /std:c++17, and update my boost library, and most of errors were eliminated. But there are still some errors related to bichon\external\libigl\include\igl\unique_rows.cpp. It reports like that
and all of errors point to these two line codes:
Do you have any idea about it?
Hi,
There might be some problem with the file you have: in https://github.com/libigl/libigl/blob/main/include/igl/unique_rows.cpp#L31
there is no colserr
.
I would suggest starting from a clean folder. But simply remove err
should be fine as well.
Hi,
There might be some problem with the file you have: in
https://github.com/libigl/libigl/blob/main/include/igl/unique_rows.cpp#L31
there is nocolserr
.I would suggest starting from a clean folder. But simply remove
err
should be fine as well.
Thanks for replying! I tried to copy the unique_rows.cpp file and it worked. However, I met many errors about runtime library:
I try to solve it by adjusting the Project Properties->C++->Code Generation from MDP runtime libraries to MTD
but still report like
I feel puzzle about the CRT, Can you help me?
Hi,
There might be some problem with the file you have: inhttps://github.com/libigl/libigl/blob/main/include/igl/unique_rows.cpp#L31
there is nocolserr
.
I would suggest starting from a clean folder. But simply removeerr
should be fine as well.Thanks for replying! I tried to copy the unique_rows.cpp file and it worked. However, I met many errors about runtime library: I try to solve it by adjusting the Project Properties->C++->Code Generation from MDP runtime libraries to MTD but still report like I feel puzzle about the CRT, Can you help me?
error text:
fmtd.lib(format.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@qeaa@H@Z) already defined in libcpmtd.lib(xlock.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@qeaa@H@Z) already defined in libcpmtd.lib(xlock.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(void)" (??1_Lockit@std@@qeaa@XZ) already defined in libcpmtd.lib(xlock.obj)_Locinfo(void)" (??1_Locinfo@std@@qeaa@XZ) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@qeaa@PEBD@Z) already defined in pipeline_schedules.obj
2>msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Locinfo::
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: struct _Cvtvec __cdecl std::_Locinfo::_Getcvt(void)const " (?_Getcvt@_Locinfo@std@@qeba?AU_Cvtvec@@xz) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: struct lconv const * __cdecl std::_Locinfo::_Getlconv(void)const " (?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@xz) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getdays(void)const " (?_Getdays@_Locinfo@std@@QEBAPEBDXZ) already defined in libcpmtd.lib(wlocale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getmonths(void)const " (?_Getmonths@_Locinfo@std@@QEBAPEBDXZ) already defined in libcpmtd.lib(wlocale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getfalse(void)const " (?_Getfalse@_Locinfo@std@@QEBAPEBDXZ) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Gettrue(void)const " (?_Gettrue@_Locinfo@std@@QEBAPEBDXZ) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: unsigned short const * __cdecl std::_Locinfo::_W_Getdays(void)const " (?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ) already defined in libcpmtd.lib(wlocale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: unsigned short const * __cdecl std::_Locinfo::_W_Getmonths(void)const " (?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ) already defined in libcpmtd.lib(wlocale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Yarn::c_str(void)const " (?c_str@?$_Yarn@D@std@@QEBAPEBDXZ) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: static void * __cdecl std::_Crt_new_delete::operator new(unsigned __int64)" (??2_Crt_new_delete@std@@SAPEAX_K@Z) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: static void __cdecl std::_Crt_new_delete::operator delete(void *)" (??3_Crt_new_delete@std@@SAXPEAX@Z) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::locale::id::operator unsigned __int64(void)" (??Bid@locale@std@@QEAA_KXZ) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __cdecl std::locale::facet::facet(unsigned __int64)" (??0facet@locale@std@@iEAA@_K@Z) already defined in pipeline_schedules.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: virtual __cdecl std::locale::facet::~facet(void)" (??1facet@locale@std@@Meaa@XZ) already defined in pipeline_schedules.obj
hi, Does it work for release mode?
Hi,
I don't currently have a Windows machine to test, and the closest one I can get is from the GitHub action.
Here is the config file that passes.
https://github.com/jiangzhongshi/bichon/blob/main/.github/workflows/cmake.yml#L154
This command may have higher chance of success.
(in the root folder)
cmake -DCMAKE_BUILD_TYPE=Release -B build -S . -DIGL_STATIC_RUNTIME=ON
Hi,
I don't currently have a Windows machine to test, and the closest one I can get is from the GitHub action.
Here is the config file that passes. https://github.com/jiangzhongshi/bichon/blob/main/.github/workflows/cmake.yml#L154 This command may have higher chance of success.
(in the root folder)
cmake -DCMAKE_BUILD_TYPE=Release -B build -S . -DIGL_STATIC_RUNTIME=ON
Thanks a lot!