Richard Shann wrote:
SCM proc = gh_str2scm("d-UploadRoutine", strlen("d-UploadRoutine")); // proc = scm_string_to_symbol("d-UploadRoutine"); // proc = scm_string_to_symbol( gh_str2scm("d-UploadRoutine", strlen("d-UploadRoutine"))); SCM arg1 = gh_str2scm("hello", strlen("hello")); SCM arg2 = gh_str2scm("he2lo", strlen("hello")); SCM arg3 = gh_str2scm("he3lo", strlen("hello")); SCM arg4 = gh_str2scm("he4lo", strlen("hello")); scm_call_4(proc, arg1, arg2, arg3, arg4); The three definitions of proc lead to the following three error messages: ERROR: In procedure apply: ERROR: Wrong type argument in position 1: "d-UploadRoutine"
It is indeed the wrong type of argument. Look at scm_c_define_gsubr() http://www.gnu.org/software/guile/manual/html_node/Primitive-Procedures.html Paul. and p.s. use the new style interface not the gh_* one. e.g. SCM arg1 = scm_makfrom0str("hello");