| Summary: | Errors cross-compiling Lubuntu 16.04 -> Windows | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Rainer Deyke <rainerd> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | kai.sterker |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows (All) | ||
| Attachments: |
patch fixing both errors
build log showing the error messages |
||
Created attachment 2534 [details]
build log showing the error messages
The attached patch is slightly wrong. The new method with two char* arguments is invoked as WIN_SetErrorfromHRESULT, but declared/defined as WIN_SetErrorFromHRESULT2, which means it does not compile without changing one or the other. Also, gcc spits a warning about passing const char* "" as non-const in the call. In general, this patch does look much nicer than the external patches linked here https://bugzilla.libsdl.org/show_bug.cgi?id=3336#c2 Would really love to see this issue fixed in time for SDL 2.0.5. Cross-compiling or resorting to Mingw64 on Windows seems quite common practice when primarily developing for Linux. This is fixed in https://hg.libsdl.org/SDL/rev/6cf7d55773b3 *** This bug has been marked as a duplicate of bug 3336 *** |
Created attachment 2533 [details] patch fixing both errors I'm unable to cross-compile SDL2, neither 2.0.4 nor the latest hg, under amd64 Lubuntu 16.04. My compiler is i686-w64-mingw32-gcc (GCC) 5.3.1 20160211. I suspect that this problem affects all gcc 5.x builds of mingw on all platforms, although I haven't tested any others. There are two errors. The first is that SDL defines static versions of IID_IDXGIFactory2 and co, which conflicts with the non-static versions of the same GUIDs, as declared in the Direct3D11 header files. The other is that SDL uses the pattern __FUNCTION__ ", text here" to generate string literals containing the function name, which doesn't work because __FUNCTION__ is a variable, not a preprocessor token. I have attached a patch that fixes both errors.