lime icon indicating copy to clipboard operation
lime copied to clipboard

Fix lime.ndll build on MinGW

Open tobil4sk opened this issue 1 year ago • 5 comments

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.

tobil4sk avatar Apr 12 '23 15:04 tobil4sk

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.

tobil4sk avatar Apr 12 '23 22:04 tobil4sk

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.

DigiEggz avatar Aug 25 '23 15:08 DigiEggz

I'm interested in testing this build! Could you offer any links to the new precompiled minGW version of lime.ndll?

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.

tobil4sk avatar Aug 29 '23 11:08 tobil4sk

I'm interested in testing this build! Could you offer any links to the new precompiled minGW version of lime.ndll?

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 hxcpp patches HaxeFoundation/hxcpp#1044 HaxeFoundation/hxcpp#1045 HaxeFoundation/hxcpp#1046) 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.

DigiEggz avatar Aug 30 '23 13:08 DigiEggz

When trying compiling my app (with this library), I get an error: Error: /Users/E/Documents/Haxe/hxdiscord_rpc/git/project/discord-rpc/src/connection_win.cpp:8:10: fatal error: 'windows.h' file not found

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 -32 flag doesn't change anything) and trying to set the MINGW_ROOT path results in a double-concatenated string for some reason, but it otherwise works.

DigiEggz avatar Sep 21 '23 19:09 DigiEggz