MySQL UDF Installation

I need to install a user defined MySQL function from C source code. The README file told me to compile with this command:

gcc -I/usr/local/include/mysql -O -pipe -o -shared -L/usr/local/lib/mysql -lmysqlclient

It gives me a lot of errors, probably because those are the wrong directories in the command line. What directories should I use? Will it even be possible to use user defined functions in MySQL with Dreamhost’s configuration?

I got it to compile; the only other installation step outlined in the README file was to copy the compiled to /usr/lib/. I obviously don’t have permissions to do that, but if that file were there, would that really make those functions available in a query?