-
Notifications
You must be signed in to change notification settings - Fork 321
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
Unable to build shared library on Windows (MinGW-w64) #2225
Comments
same here |
when I compile with verbose mode, what is passed to compiler is |
That is only true if |
#413 would still be nice to have 😉 |
Apologies, I used the wrong macro: it should have been HWY_CONTRIB_DLLEXPORT for anything in hwy/contrib. Fixing shortly. That aside, I'm not sure it actually makes sense to use shared libraries for Highway. There's not a lot of code that can actually go into the .so/.dll, and maybe it's more trouble than it is worth? |
PiperOrigin-RevId: 639656599
@kmilos we can certainly add the LANGUAGES CXX to CMakelists, I'm not sure the other prefix change is still relevant because we now instead set RUNTIME_OUTPUT_DIRECTORY? |
I was suggesting at MSYS2 in the CI in general... |
hm, when we last tried enabling it, there were numerous issues. Do you have any statistics on how many projects are using Highway with MSYS/MinGW? Would anyone be willing to help with these and future issues? |
PiperOrigin-RevId: 639656599
So far libjxl and libvips depend on it directly in the MSYS2 repo https://packages.msys2.org/package/mingw-w64-ucrt-x86_64-highway?repo=ucrt64 and then all of their clients. It's hard to tell who else uses it indirectly, outside the repo... |
PiperOrigin-RevId: 639656599
When building highway 1.2.0 on Windows using MinGW-w64 the shared build fails with the following error:
When looking at this section in
hwy/highway_export.h
:and this section in
CMakeLists.txt
:it's clear that
set(DLLEXPORT_TO_DEFINE "HWY_SHARED_DEFINE")
causesHWY_DLLEXPORT
to be defined as nothing instead of__declspec(dllexport)
.I was able to build successfully after changing
CMakeLists.txt
soHWY_SHARED_DEFINE
is not defined.The text was updated successfully, but these errors were encountered: