Try using the "invoke compiler directly".
Does it work? If not, please post the errors here.
If it does work, Then please use the "generate makefile" option to export to a makefile. Then try compiling with that makefile (select "use custom makefile" in the project properties), and see if it can compile.
In both cases, please post the full commandline log here.