-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support #281
Comments
Windows has the following options to compile C++ program.
I tried to see how to compile ginkgo static library in Visual Studio without CUDA.
The compiler complain that the functions are redefined.
After doing these fixes, Visual Studio can compile ginkgo static library without CUDA. |
I am tentatively adding this to the v1.1.0 milestone as we have pretty much everything for this (except for merging @yhmtsai #351 PR). If this still needs a lot of stabilization and is not ready, this can be removed. We should at least have partial windows support (MinGW was merged and we are hopefully still compatible). |
For the MSVC unrecognized SFINAE, use constexpr member of struct not constexpr function. template <typename T>
static xstd::enable_if_t<is_complex<T>()> write_entry_impl(
std::ostream &, const T &) {}
template <typename T>
static xstd::enable_if_t<!is_complex<T>()> write_entry_impl(
std::ostream &, const T &) {} Fixed version template <typename T>
static xstd::enable_if_t<is_complex_s<T>::value> write_entry_impl(
std::ostream &, const T &) {}
template <typename T>
static xstd::enable_if_t<!is_complex_s<T>::value> write_entry_impl(
std::ostream &, const T &) {} For exporting shared library, set |
We now have full windows support, so I will close this although it is still a good reference to point people to. |
Visual Studio related problems
A potential issue are the compiler differences between Visual Studio and G++/Clang. It is possible that Ginkgo requires some bug fixes for proper Visual Studio support.
Shared library building
A known issue is that build fails on Windows due to missing shared libraries.
Seems that this stackoverflow question is related: https://stackoverflow.com/questions/33062728/cmake-link-shared-library-on-windows
It seems there is this generate_export_header command in CMake, which has to be done for every shared library we create, and the source code should be modified accordingly: https://cmake.org/cmake/help/v3.9/module/GenerateExportHeader.html
Some resources related to this:
The text was updated successfully, but these errors were encountered: