I'm having a problem building an ios framework that depends on a OpenGL 
library. 

if this is the file:

package gfx


import (
 "github.com/goxjs/gl"
)


func test() {
 gl.Clear(gl.COLOR_BUFFER_BIT)
}


This is the build output:
gomobile bind -target=ios
gomobile: go install 
-pkgdir=/Users/johnteasdale/gocode/pkg/gomobile/pkg_darwin_arm 
-tags ios github.com/jpteasdale/gfx failed: exit status 2 
# github.com/jpteasdale/gfx/vendor/github.com/go-gl/gl/v2.1/gl 
ld: framework not found OpenGL 
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)



I know where the framework is:

ls /System/Library/Frameworks/OpenGL.framework
Headers Libraries Modules OpenGL Resources Versions



I've tried all of the following with the same result:

gomobile bind -target=ios -ldflags "-L /System/Library/Frameworks"

gomobile bind -target=ios -ldflags "-F /System/Library/Frameworks"

gomobile bind -target=ios -ldflags "-extldflags -F 
/System/Library/Frameworks"

LDFAGS="-F/System/Library/Frameworks" gomobile bind -target=ios

CGO_LDFLAGS="-F /System/Library/Frameworks" gomobile bind -target=io



There isn't much documentaiton on this, so I was hoping one of y'all had 
seen this before.

Versions:
macOS 10.13.2 

go version

go version go1.9.2 darwin/amd64

gomobile version

gomobile version +5704e18 Mon Jan 22 17:02:51 2018 +0000 (android,ios); 
androidSDK=


clang -v

Apple LLVM version 9.0.0 (clang-900.0.39.2)

Target: x86_64-apple-darwin17.3.0

Thread model: posix

InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to