Has anyone tried that with symbian? I get it linked well but when I try to run it target it gives me kern exec 2. What should I do?

I've tried compiling the .lib with armv6 and compile_as_arm and compiled my .dll with armv5 compile_as_arm but it gives the kern exec when runing.