blob: 30730578a7ac36edbd989be8535b390b11c2449c [file] [log] [blame]
mtklein3eeb1562014-11-03 10:45:50 -08001package main
2
3// First, build Skia this way:
4// ./gyp_skia -Dskia_shared_lib=1 && ninja -C out/Debug
stephana0b5fc972014-10-31 07:11:19 -07005
6/*
stephana0b5fc972014-10-31 07:11:19 -07007#cgo LDFLAGS: -lGL
8#cgo LDFLAGS: -lGLU
mtklein3eeb1562014-11-03 10:45:50 -08009#cgo LDFLAGS: -lX11
10#cgo LDFLAGS: -ldl
11#cgo LDFLAGS: -lfontconfig
12#cgo LDFLAGS: -lfreetype
13#cgo LDFLAGS: -lgif
14#cgo LDFLAGS: -lm
15#cgo LDFLAGS: -lpng
16#cgo LDFLAGS: -lstdc++
17#cgo LDFLAGS: -lz
18
19#cgo LDFLAGS: -L ../../out/Debug/lib
20#cgo LDFLAGS: -Wl,-rpath=../../out/Debug/lib
21#cgo LDFLAGS: -lskia
22
23#cgo CFLAGS: -I../../include/c
stephana0b5fc972014-10-31 07:11:19 -070024#include "sk_surface.h"
25*/
26import "C"
27
mtklein3eeb1562014-11-03 10:45:50 -080028import (
29 "fmt"
30)
31
32func main() {
33 p := C.sk_paint_new()
34 defer C.sk_paint_delete(p)
35 fmt.Println("OK!")
stephana0b5fc972014-10-31 07:11:19 -070036}
37
38// TODO: replace this with an idiomatic interface to Skia.