24 Fév
2009
24 Fév
'09
13:58
On Tue, Feb 24, 2009 at 05:41:24AM -0800, John Thompson wrote:
Hi,
I'm trying to get a toy, loadable C++ library compiled. My setup is as follows:
foo.scm:
(define bar (c-lambda (char-string) int "cpp_bar"))
foo.cpp:
int cpp_bar(char* text) { return 0; }
foo.h:
int cpp_bar(char* text);
Prototype in foo.h should be defined like: extern "C" int cpp_bar(char *text); or extern "C" { int cpp_bar(char* text); … } for a group of functions. -- Ramil Farkhshatov