-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Fix lime.ndll build on MinGW #1660
base: develop
Are you sure you want to change the base?
Conversation
5ba7e8e
to
c7c386d
Compare
I separated out some of the commits into #1661, because with those commits it's already possible to cross compile projects with mingw with a precompiled lime.ndll. |
I'm interested in testing this build! Could you offer any links to the new precompiled minGW version of lime.ndll? If not, I can look into building from source, but it might be a while. |
Hi sorry, I haven't uploaded the precompiled lime.ndll anywhere. Building from source isn't too complicated as long as you have mingw set up, when I have a look at this again I can try to provide some proper instructions for how to do this. I should have provided instructions originally in the PR, sorry. Once I have a look again I could probably upload a copy of the ndll here as well. Just a heads up, I managed to get things compiling but the build wasn't really working. When I tried to run a project with the mingw ndll there was no window showing up unfortunately. This will require more investigating to figure out what exactly is wrong. In the meantime I have just been building my actual project code with mingw (with #1661 and the git version of hxcpp) but using the regular Windows lime.ndlls instead of compiling my own mingw copy. |
I'll give that a try! Thanks again for all of the work you've put into this build. |
When trying compiling my app (with this library), I get an error: Do you know what I may have to do in order to get the windows.h header file to be included? I'm not sure if I haven't linked minGW or if it's otherwise not set up correctly. Edit: I used this guide to manually set some of my paths. I cannot compile to 32-bit (he |
35d6050
to
75a0488
Compare
When cross compiling from Linux, header names are case sensitive unlike on Windows.
This causes issues on mingw, and is no longer needed since openal now uses std::isfinite (c++11) instead of isfinite. kcat/openal-soft@3ae1c78
75a0488
to
33f616e
Compare
With mingw, converting from char* to _bstr_t calls ConvertStringToBSTR which is not defined by mingw. Creating all strings from wchar* avoids this issue. comsuppw.lib is also unavailable on mingw, and we need to add wbemuuid.lib manually as the #pragma comment(lib, ...) in System.cpp is only respected by MSVC. Adding bstr_t explicitly rather than relying on implicit conversion also avoids gcc warnings here.
33f616e
to
a475216
Compare
When cross compiling, the default target is set as neko in HXProject, so we can't assume that rebuild will always be cpp.
`wbemuuid.lib` must be linked explicitly, since #pragma comment(lib, ...) only works with msvc. `comsuppw.lib` does not exist in mingw. `no_shared_libs` must be set for mingw to ensure the standard library and other libraries are linked statically. `.lib` must be replaced with `${LIBEXT}` so that it resolves to `.a` on mingw.
I figured out that this issue can be worked around by avoiding With current hxcpp, when cross compiling from linux it is necessary to rebuild with This compiles properly now, and also runs successfully from my testing! |
Fixes some issues to allow compiling lime.ndll with MinGW.
I'm not too sure what the best way to deal with the System.cpp situation would be.