This project is a solution to the Jetbrains internship task, which invloved linking against a precompiled renderer library to open a window and display an embedded animation.
-
main.c - loads the shared library at runtime via dlopen, resolves required symbols, initializes the context, runs the loop.
-
api_hook.h - provides hooks from library API to C functions as well as providing bridge function using dlfcn library to work with libraries dynamically.
-
render.h - defines the Render struct with the exact offsets the library expects (incl. a native window handle at offset 0x428) plus tail slack to prevent heap corruption.
Linux
# using ubuntu
> cc main.c ./librender_x86_64.so -lX11 -lasound -ldl -o app
> ./appmacOS
> cc main.c ./librender.so -framework Cocoa -framework AudioToolbox -ldl -o app
> ./appMore detailes on approach and solution are provided in personal task answer.
Thanks to Jetbrains Team for providing this challenge.