engkin's recent code worked fine for me. I had to do three things -
1. In rsvg, there is an ifdef Windows that sets DYNLINK, but just under it there is another line that defines DYNLINK irrespective of using Windows or not. I am using Linux and needed to comment out the unilateral define.
2. I installed librsvg-dev
3. engkin's code, in unit1, pointed to a specific svg file I did not have. So I copied the powered-by.svg from my Lazarus src to this project's working dir and edited engkin's code accordingly.
It then compiled OK and ran. Initially, I had a just a black window, but realised it was a positioning thing, if I expanded the window, down, there was our familiar logo.
Now, point 1 and 2 are Linux specific but hint that you must have the "SAX renderer" library installed, in Windows I guess thats a DLL. I don't know how DLL's work so don't know if you also need the headers.
The third point is just about putting a suitable svg file somewhere where the app can find it. engkin's code does not test for it apparently.
engkin's code also uses writeln, I'm guessing that means something he has done lets writeln write to a "consol" even though its Windows, way, way beyond my Windows experience, I'd expect that writeln to crash the app.
(but I'd like to know how to do that, I do not understand how anyone can develop code without a console to drop messages to.)
Overall, with its heavy dependencies on libraries, appears to me that BGRA is still a better option.
EDIT: Getting back to your question, how to use Units ? Your initial try objected to a missing PGError and Pugchar, they are found when you include "glib2" up around line 30 of Unit1. enjkin also seems to have used "Variants", looks unnecessary to me.
EDIT2: Err, am I missing something here ? All these GTK calls, unit dependencies etc. How are they going to work on Windows ? It is possible to install GTK2 on Windows but why would you ? This looks like Linux only code to me.
Davo