Place file into qemu root directory
Do cd path/to/qemu && ./name_of_file name_of_target
(i.e. x86_64-softmmu)
Library is at /path/to/qemu/x86_64-softmmu/libqemu.so
You might need to compile vl.c
and link with it in your final
binary, just do something like this:
#define main __definetly_not_main
#include "/path/to/qemu/vl.c"
#undef main
int main() {
// Whatver you want to do with qemu
}
Please note that the cmdline on Line 26 of the script is outdated and incompatible with recent versions of the QEMU source. It currently defines to an empty string.