It might be because it is linked against the mysql library.
Try to copy libmysql.dll (in lib/) with the libcod dll.
Thanks, this did the trick!
I also had to use the -m32 flag in compiler and linker settings to build a 32bit dll (when using TDM-GCC64), now its working