I wrote some code for linux/unix(ld_preload), how can i compile it for FreeBSD on my Ubuntu Server using G++, or maybe other compiler?
Thanks!
I wrote some code for linux/unix(ld_preload), how can i compile it for FreeBSD on my Ubuntu Server using G++, or maybe other compiler?
Thanks!
No need to recompile: there's a shim for the differences that's a little more tightly integrated than just a compat library. Some linux-only facilities you'll need to avoid, and you do need to 'brand' the linux binaries w/ brandelf
, your starting point is that link.
My recommendation would be to create a FreeBSD virtual machine (using software like virtualbox) and compile the code on that.