Is there a shared library/object for *nix platforms like the .dll for windows, people need this to use GLFW with CrossPlatform non C compilers like Free Pascal.
No, there isn’t. There should be, of course, but I simply haven’t gotten to that point yet. Sorry.
I will try to use the C libs in FPC, i might just work.
Many people would like this library on *nix
I have succeeded in building a shared library on Gentoo Linux Kernel 2.6.
I’ve modified the Makefile.x11 appropriately for this task. Perhaps the update can be added to the project? The shared library has been tested with the triangle example, and it works great.
The only problem is that in order to get the library built in shared format, I had to disable the assembler section in the cpu detection source. Register EAX is being used there; unfortunately the compiler needs that register for the -fPIC option (Position Independent Code, necessary for shared libraries).
- John R.
I’m not a ASM guru myself… but the code should be able to be modified to use another register. I’m surprised the compiler couldn’t handle that by adding push and pop statements where nessecary.
I agree that a shared library could be really useful, as I also plan to use GLFW in linux with freepascal.
Absolutely. It should be possible to update the assembler source to allow for the shared library build. But I didn’t want to “mess” with the stable build to get it working as long as I could just disable the macro definiton in the mean time. A push/pop likely would work, but it’s probably just better to use a different register. I didn’t look into it in much detail.
As it is now, it’s working fine without the assembler portion compiled in. I’ve compiled several fairly detailed opengl projects with the glfw shared library, and they are working great right now. I’m using a special D language interface included in the Derelict project at dsource.org.
- John R.