Thanks, that lead me in the right direction.
The OpenGL library that I'm using: https://github.com/goxjs/gl claims to
support iOS (which it does) but it doesn't recognize the 'ios' build tag
that gomobile uses.
On Sunday, January 28, 2018 at 5:58:12 AM UTC-8, Elias Naur wrote:
>
> Only OpenGL ES (OpenGLES.framework) is available on iOS. Furthermore, iOS
> builds use the frameworks installed in the platform directory. On my system
> that's
>
>
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks
>
> or
>
>
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks
>
> for simulator builds. Both directories contain OpenGLES.framework but no
> OpenGL.framework.
>
> - elias
>
> On Saturday, January 27, 2018 at 3:12:23 PM UTC+1, John Teasdale wrote:
>>
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.