Ò»¸öºÜ¼òµ¥µÄÎļþ£¬¾ÍÊÇprogramming ruby ÉϵÄÀý×Ó£¨
http://www.ruby-cn.org/book/Prog ... ¬Ôò³öÏÖÕâÑùµÄ´íÎó£º
error C2664: 'rb_define_method' : cannot convert parameter 3 from
'unsigned long (unsigned long)' to 'unsigned long (__cdecl *)(...)'
None of the functions with this name in scope match the target type
ÐèÒª¸Ä³É.cµÄÎļþ²ÅÐС£
Èç¹û·ÇÒªÓÃcpp£¬¿ÉÒÔÐÞ¸ÄÈçÏ£º
rb_define_method(cTest, "initialize", RUBY_METHOD_FUNC(t_init), 0);
rb_define_method(cTest, "add", RUBY_METHOD_FUNC(t_add), 1);
Trackback:
http://tb.blog.csdn.net/TrackBack.aspx?PostId=400195