For those who might be interested here is an update. I called libjulia.dll
from a straight C application using Visual Studio 2010 and it work ok. So
something odd with Delphi. Delphi can be used to develop two types of
application, Console or GUI apps. I was calling libjulia.dll from a GUI
app. Out of curiosity I tried calling the julia dll from a console Delphi
app and that worked. Never seen this behavior before so I am asking some of
my Delphi colleagues to see if they have an explanation. The only thing I
can think of is that maybe libjulia is doing something with
stdin/stdout/stderr which isn't compatible with the GUI application.