[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gh_new_procedure with c++

From: gianluca giorgolo
Subject: gh_new_procedure with c++
Date: Sun, 22 Jun 2008 22:13:44 +0000 (GMT)


I'm sorry if the question has already been answered on the list but I couldn't 
find any reference to the topic in the archive (nor in guile user manual).

I'm trying to use 'gh_new_procedure' to define a new procedure for Scheme that 
refers to a c++ function. This function takes more than 0 arguments. But given 
that the gh_new_procedure is defined as taking a function with no argument, g++ 
complains about the invalid conversion:

main.cpp:131: error: invalid conversion from ‘scm_unused_struct* 
(*)(scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, 
scm_unused_struct*, scm_unused_struct*)’ to ‘scm_unused_struct* (*)()’
main.cpp:131: error:   initializing argument 2 of ‘scm_unused_struct* 
gh_new_procedure(const char*, scm_unused_struct* (*)(), int, int, int)’

(I'm using guile 1.8.1 and gcc 4.1.3)

Is there any way to avoid the type conversion that apparently g++ doesn't like?

Thanks a lot in advance for any reply!


Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]