From: Feiyi W. <fw...@gm...> - 2007-06-19 12:43:39
|
For some reason, I didn't think this message went through, send it again. Feiyi ---------- Forwarded message ---------- From: Feiyi Wang <fw...@gm...> Date: Jun 18, 2007 11:28 AM Subject: a few general questions on wrapping a c libary To: swi...@li... hi - (1) Is there some general guidelines for wrapping a C library, say this C library has a number of .h files that defines constants, structures, and function declaration. If I don't necessarily know which function to export, so is this OK (or a good idea) to use something like: %include "cmd.h" %include "msg.h" ... (2) In the case of a function is using a generic libc structure, such as struct timeval, should I copy this structure out and put it into interface definition file, or there are better ways of doing this? (with pasting this structure, it seems the wrapping doesn't work). (3) Say, if I do copy and paste into interface definition file, why the generation reports twice the warning message on each class correction? rproxy.i:13: Warning(801): Wrong class name (corrected to `Timeval') rproxy.i:13: Warning(801): Wrong class name (corrected to `Timeval') thanks Feiyi |