I'm getting the following error message when I try to compile a function. Any help will be greatly appreciated.
In[1]:= cf=Compile[{{p,_Real}},NMaximize[-x^p-3x^2+x,x]]
Out[1]= CompiledFunction[{p},NMaximize[-x^p-3 x^2+x,x],-CompiledCode-]
In[2]:= cf[4]
Out[2]= {0.0825888,{x->0.16374}}
CompiledFunction::cfse: Compiled expression {0.0825888,{x->0.16374}} should be a machine-size integer. >>
CompiledFunction::cfex: Could not complete external evaluation at instruction 1; proceeding with uncompiled evaluation. >>
~Cuneyt