The code is not wrong here. Runs fine on windows, however, I'm building with C::B. My guess, somewhere there is a wrong file compiled & added in the build.
Please check: do you have a file ui_lua_shared.cxx? If so, please remove it.
Note: you should also have a file ui_lua_shared.cpp. This file must be kept.
Just updated the repository rxadmin/ufoai, so if you pull, it will be removed automatically.