[plt-scheme] FFI, argc and argv

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Sun May 6 08:51:19 EDT 2007

Hello all,

If I have a function in C that receives int argc, and char **argv,
what's the best way to warp it up?

Two issues come to my mind:
- command-line-arguments do not provide, afaik, argv[0].
- I would have to convert the vector (command-line-arguments) to a
cvector and pass it up to the function. Something like (list->cvector
(vector->list (command-line-arguments)) _string) however I'm not sure
if this is the best way to handle things.

Any suggestions?

Paulo Jorge Matos - pocm at soton.ac.uk
PhD Student @ ECS
University of Southampton, UK

Posted on the users mailing list.