Closed khkramer closed 10 years ago
Nope, that was my bad. Pushed a fix, can you try with latest master?
That fixed that issue, thanks Will update this post later
@khkramer So, how'd it work?
It compiled without any error.s
However I accidently compiled for Linux instead of using a cross-compiler ._.
And I can't seem to get a Cygwin or Msys2 enviroment set up correctly, they all 'break' at some point.
Hrm. Mayhaps I should write up a tutorial for compiling mkxp on windows under msys2. How are you trying to setup msys2?
Nvm actually.
I've got my lubuntu vm to make me a nice windows executable :)
And then I found I build SDL_image without jpeg support..
Alright recompiled SDL_image and now it's working.
EDIT: Got Win32API working (I think).
Yeah, Win32API can be used, but I think you have to require
it now. Though, I'd recommend not using it, its slated for removal and will prevent you from making cross-platform games. Btw, does mkxp.exe open a console window when you use it?
Yes it does open a console window.
I currently have no other option to use Win32api till I port all the functions to ffi.
Also I can't seem to be able to find or use Zlib.
Do you get into the game proper? If so, you have access to zlib (the scripts are zlib compressed within Scripts.rxdata, so if you can use those, you have access to zlib)
It loads the scripts.rxdata yeah but is crashing because I can't use zlib in scripts and require 'zlib' doesn't work.
While in the regular rgss player I can use zlib just fine.
Zlib is not in the core. It's part of the standard library.
How you deal with that depends on how your mkxp build was linked against libruby (dynamically or statically). Either you're able to require it (that assumes extension libraries like zlib.so can be found; if not, just copy them to somewhere and add that path to $LOAD_PATH
), or you need to rebuild Ruby and statically link all wanted extension (like the RGSS programmer(s) did).
@khkramer you can place $: << 'lib'
in a script, then place zlib.so from the apropriate ruby version in a folder, lib
inside the game dir and require it.
EDIT: and yes, even though its a windows library, it is named *.so
, and renaming it to zlib.dll doesn't work lol.
It doesn't give an error on the require, so I assume it's loading zlib.so correctly, for some reason still can't use zlib though.
I'll try recompiling ruby.
@khkramer how are you attempting to use zlib? Any error output there?
Uninitialized constant Zlib.
And I'm using it like this:
ZLib::Inflate.inflate(data)
Always copy error messages (if possible)! Did you write Zlib
or ZLib
in your code? It's Zlib
with a lowercase L.
And try printing $LOADED_FEATURES
. If it was successfully loaded, this array contains a path to the library.
@cremno
Turns out somewhere in the code it was indeed spelled as ZLib, it took me so long to notice it .. Thanks.
@khkramer yeah, typos can kill you if you're not careful :P
Can we close this issue?
Yes, no compilations issues anymore so..
I'm pretty new to compiling C++ programs, so could this be a mistake on my end?