Enforce GCC instead of MSVC on windows #4000
Unanswered
zehua-jerry-yu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using setuptools to install, and I want to enforce GCC compiler instead of MSVC on windows. I tried some methods mentioned in here, but the
setup.cfg
method mentioned does not work. I could specify--compiler msvc
but if I write--compiler mingw32
it raises several errors:gcc: error: /EHsc: No such file or directory
,gcc: error: /bigobj: No such file or directory
,gcc: error: /std:c++14: No such file or directory
.Also, I tried the following command (env_csmar is an anaconda virtual environment under my disk F):
D:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gcc.exe -static -shared -std=c++14 -DMS_WIN64 -fPIC "-IF:\...\env_csmar\lib\site-packages\pybind11\include" "-IF:\...\env_csmar\include" "-L F:\...\env_csmar\libs" -c example_cpp.cpp -o example_cpp.o
This works, and the .o file can be imported as a module on my windows. However, it still says it is compiled with MSVC (from
#ifdef _MSVC_LANG
). Why is this?A very detailed description of my situation can be found here (link).
Beta Was this translation helpful? Give feedback.
All reactions