Created
September 5, 2018 08:38
-
-
Save tadovas/8752b6eb9672b5b434b29fe8e49dc0f0 to your computer and use it in GitHub Desktop.
gomobile failing cpp example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cpptest | |
/* | |
#include "hello.h" | |
*/ | |
import "C" | |
func Hello() { | |
C.hello() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "hello.h" | |
#include <iostream> | |
using namespace std; | |
void hello() { | |
cout<<"Hello user"<<endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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