Hello,
I have been cracking my head on the cd errors. Any help will be
appreciated!!
Context: I want to create a J interop code to MonetDB [1]. I have a simple C
code running that uses MonetDB in the embedded mode. I want to port that to
J.
OS : Win XP / 32
To port:
typedef struct opt {
opt_kind kind;
char *name;
char *value;
} opt;
__declspec(dllimport) int mo_builtin_settings(opt **Set);
My J port:
symget=: 15!:6
symdat=: 3 : 0 NB. symdat symget <'name'
had=. {.memr y,(IF64{4 8),1,JPTR
had+{.memr had,0,1,JPTR
)
iad=: [EMAIL PROTECTED]@boxopen
MUTIL =: '"E:\08.utils\monetdb\monetdb01\monetdb01\lib\libmutils.dll"'
cdu =: 1 : '(MUTIL,m)&cd'
settings =: '_mo_builtin_settings > i i' cdu
init =: verb define
s =: 0
l =: settings <(iad 's')
)
Observations:
1) With the above definition, I get cder 2 0
init ''
|domain error: cd
| l=: settings<(iad's')
cder ''
2 0
2) Just to check if the procedure is getting discovered, I did this:
settings =: '_mo_builtin_settings > i l' cdu
init ''
|domain error: cd
| l=: settings<(iad's')
cder ''
5 1
>From this I infer that :
2a) method is found in the library
2b) the declaration of second parameter is wrong.
Q: Why do I get a 2 0 (procedure not found) error in this case? As far as I
can see J is able to tell me that the declaration is invalid that tells me
that the procedure name resolution is ok.
Q: Will I get a 2 0 error on execution of the method due to other internally
called methods? If so, how can I discover the missing libraries that can
help in the execution?
Note: My C code in VC++ 2005 Express Edition works fine!
Thanks,
Yuva
[1] http://www.monetdb.nl/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm