Calling C functions from NewEra Pcode ?
Posted in 1996
Topics: General Discussion
Hello all. We have been trying without success to call C functions from our Newera pcode executables. We've seen the section in the Release Notes regarding this, which seem somewhat incoherent in that they a) refer to a type "cfunc_t" which isn't defined anywhere that we can find, and b) say at one point that: "Every DLL must include a function called GetUsrFunc() (or some other fixed name) ..." Huh ? Some other fixed name ? Like what ? Anyway, we've followed the rules as best we can, substituting _USERFUNC for c_funct (we found _USERFUNC in fglrt.h and it seemed somewhat appropriate), with no success at all. Pcode applications which contain calls found in the DLL and are run with "-u name.dll" just return "function foo not defined..." at runtime. Before you ask, we've marked all our C functions for export, as well as the UsrFuncts array and GetUsrFunc() and GetUsrFuncArray(). Anyone done this, or knows someone who has, or met someone at the pub who has, or anything... ? Not that we're desperate, mind you; we've still got 20 days to deadline... (but who's counting ?) Ian Macdonald, ikm@labsys.com.au Phone +61 3 9894 2500 Laboratory Systems, Melbourne, Australia. Fax +61 3 9894 3338