Skip to content

Instantly share code, notes, and snippets.

@tmc
Created July 25, 2013 05:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tmc/6077200 to your computer and use it in GitHub Desktop.
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <IOBluetooth/IOBluetooth.h>
void call_objc_example(void) {
inquiry = [[IOBluetoothDeviceInquiry alloc] initWithDelegate:nil];
NSLog(@"from objective-c", inquiry);
}
*/
import "C"
func main() {
C.call_objc_example()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment