-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Issues building on Windows with MinGW-w64 #361
Comments
Thanks for opening the issue! We would like to fix the issue, however, it seems like your patch works around the issues rather than addressing them. Thus while they do fix compilation, they do not fix the core problems that lead to the compilation problems in the first place. For the first error REQUIRE(stmt != NULL) The correct fix here would be to change The second issue seems to be an issue with a conflicting #define statement. This should also be solved in a different manner, but first we should figure out where the conflicting define comes from. |
In MinGW-w64 |
Ideally we would not include windows.h anywhere except where it is absolutely required (e.g. file_system.cpp) because of precisely such issues. Unfortunately catch seems to include it. I suppose this is one of the (major) disadvantages of header only libraries, any dependencies that the library has are dragged into everything. I would suggest either (1) we undef common names ( |
You can never be sure your library isn't included by code that also needs to include windows.h. |
Excellent point, indeed we should make duckdb.hpp compatible with windows.h. The problem right now is that the catch.hpp only includes windows.h if another (more slimmed down) header is not available, which is not the case for MSVC but is the case for MINGW. We should fix the issue and add a test that includes windows.h to prevent further clashes here. I will take a look at doing this soon. |
We actually fixed this in the meantime. |
As mentioned in this post on stackoverflow.com there is an issue building DuckDB with MinGW-w64 on Windows.
There is an error
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
on this line:
I have also find another issue due to the fact that DELETE is defined
src/include/common/enums/statement_type.hpp
while this is already defined somewhere else for Windows.I can build successfully after applying these patches:
Though for the DELETE issue, it will be better if you could change it to something differeny.
The text was updated successfully, but these errors were encountered: