Skip to content

Instantly share code, notes, and snippets.

@tadovas
Created September 5, 2018 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadovas/8752b6eb9672b5b434b29fe8e49dc0f0 to your computer and use it in GitHub Desktop.
Save tadovas/8752b6eb9672b5b434b29fe8e49dc0f0 to your computer and use it in GitHub Desktop.
gomobile failing cpp example
package cpptest
/*
#include "hello.h"
*/
import "C"
func Hello() {
C.hello()
}
#include "hello.h"
#include <iostream>
using namespace std;
void hello() {
cout<<"Hello user"<<endl;
}
#ifndef __HELLO_H__
#define __HELLO_H__
#ifdef __cplusplus
extern "C" {
#endif
extern void hello();
#ifdef __cplusplus
}
#endif
#endif //__HELLO_H__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment