-
Notifications
You must be signed in to change notification settings - Fork 26
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
Can't build oatpp-postgres on windows mingw-w64 toolchain. #13
Comments
I'd also be open to a workaround that involves a lighter client-only oatpp-postgres library which would let me get the datatypes for postgresql in the DTO's imported such that API Client code can be generated. On windows I really only need oatpp-postgresql for building the API Client calls and will not be using the server/dbclient code anyways. I'm trying to distribute a windows client that speaks to the oatpp-postgresql server on linux. Is there a lighter solution? I spent more time toying with stdc++ and seh vs sjlj exception types along with various compiler flags and cannot make progress. Help! |
Hello @acidtonic ,
Can you please give more details? |
That is indeed what I am trying to accomplish but the DTO headers point to postgresql types so the auto generated API client calls for the windows side cannot be compiled. Am I missing something easier? |
Linux -> Running oatpp server. DTO's defined with oatpp-postgresql types. Windows -> Client only, will consume rest endpoints from server, autogenerated API Client from DTOs (fail to build since oatpp-postgres is needed to fulfill the header DTO types). |
Yes,
|
Can't build oatpp-postgres on windows mingw-w64 toolchain. I get lots of linker errors to the tune of 187mb error log. Here are a few to capture the spirit of the errors.
Steps to reproduce (I can be more detailed if needed) -> Windows -> msys2 -> pacman -S build-essential mingw-w64-x86_64-toolchain cmake git -> checkout oatpp -> build/install it using -G"MinGW Makefiles" or -G"MSYS Makefiles" -> build oatpp-postgresql and when the tests are built the following is produced...
I tried using postgresql from the offical pacman repository for mingw-w64 and thought maybe building postgresql from source with the same w64-toolchain instead would work but neither option changed anything. I also toyed with changing CXX EXTENSIONS to on/off between the projects and update the std flag for C++11 to c++14/c++17 and none of them built. I also tried adding -stdc++ to the build flags, and forcing the g++ compiler for linking.... Also tried using objdump/file/nm to inspect the .a files only to find they all were x86-64 as intended and nothing was 32-bit. All had the same seh/sjlj settings and endianness. I'm stuck :(
The text was updated successfully, but these errors were encountered: