i am getting error on the following function :
func write_file_dll(input string) {
cStr := unsafe.Pointer(C.CString(input))
defer C.free(cStr)
C.face(cStr)
}
error is :cannot use cStr (type unsafe.Pointer) as type *_Ctype_char in argument to _Cfunc_face
but when i remove unsafe.Pointer() , error changes to :
cannot use cStr (type *_Ctype_char) as type unsafe.Pointer in argument to func literal
my header is :
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
extern void face(const char *da);
it connects to external so file