forum-msg-id-136157-edit

Original date:2021-05-14 11:11:14 Edited by: ghaberek Subject: Re: MGRX Graphics Library

Icy_Viking said...

Making a DLL out of the existing C code shouldn't be too difficult, might be tedious, but should be possible. Then a wrapper for Euphoria/Phix could be made.

I found this in the readme:

  - For linux framebuffer and X11 select shared or static libraries. By 
  default only the static libraries are build (and it is the recomended 
  option). To build the shared libraries set INCLUDE_SHARED_SUPPORT=y 

So at least on Linux you should be able to build a shared library (this ends up in lib/unix/libmgrxX.so.1).

sudo apt install libjpeg-dev libpng-dev zlib1g-dev 
tar xzf mgrx134.tar.gz && cd mgrx134 
make -f makefile.x11 INCLUDE_SHARED_SUPPORT=y 

Still not sure what to do for Windows since there's no shared library option in makefile.w32.

You might be able to just bind the static library into a DLL like this, but I haven't tried it yet.

mingw32-make -f makefile.w32 
gcc -shared -o lib/win32/libmgrx.dll -Wl,--whole-archive lib/win32/libmgrx.a -Wl,--no-whole-archive -ljpeg -lpng -lz 

-Greg

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu