# Error Message from Compile???

**URL:** <https://community.wolfram.com/t/error-message-from-compile/4692>\
**Category:** Questions\
**Tags:** mathematica, compilation\
**Created:** [January 29, 2015, 4:54pm UTC](https://community.wolfram.com/t/error-message-from-compile/4692 "2015-01-29T16:54:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceroglu](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@ceroglu](https://community.wolfram.com/u/ceroglu)\
**Post date:** [January 29, 2015, 4:54pm UTC](https://community.wolfram.com/t/error-message-from-compile/4692/1 "2015-01-29T16:54:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [January 29, 2015, 5:56pm UTC](https://community.wolfram.com/t/error-message-from-compile/4692/2 "2015-01-29T17:56:04Z")

</div>

Compilation is useful for functions you define, not built-in functions.
