You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2018. It is now read-only.
Your project works fine if I send integer as parameter in my C++ function. I want to send a string from Go to C++ like: C.Free("hello"))
then what should I define in my header file. Currently, I tried this:
`#ifndef MY_PACKAGE_FOO_H
define MY_PACKAGE_FOO_H
include
ifdef __cplusplus
extern "C" {
endif
cv::string Free(cv::string len);
ifdef __cplusplus
}
endif
endif`
but I get the following error:
could not determine kind of name for C.Free
clang errors for preamble:
In file included from ./foo.go:5:
./foo.h:10:4: error: expected ';' after top level declarator
cv::string Free(cv::string len);
^
;
./foo.h:10:5: error: expected identifier or '('
cv::string Free(cv::string len);
^
2 errors generated.
where cv::string Free(cv::string len); is my only C++ function in my *.cpp file. Could you suggest anything?