Hi,
I have created a WSTP function ReturnEvalErrorP that takes a list of doubles as input and returns a double. I can call this function succesfully:
 
ReturnEvalErrorP[{0.1}]
and it returns a double. I want to minimize this function, so I defined a function:
 
Clear[f]; f[p1_] := ReturnEvalErrorP[{p1}]
and f[0.1] returns a double. Calling Minimize with this function however always fails with {$Failed, {p1 -> 0}}
 
    Minimize[f[p1], {p1}, Reals]
Any ideas? Gijsbert