OSX help

153 views
Skip to first unread message

Chris Hinsley

unread,
Dec 27, 2014, 7:07:46 AM12/27/14
to go...@googlegroups.com
Has anybody else installed and ran the example on OSX ?

If so would you provide a simple explanation of how you managed it.

Regards

Chris

Chris Hinsley

unread,
Dec 27, 2014, 7:09:48 AM12/27/14
to go...@googlegroups.com
I installed Glew via macports, did all the lib and include dir install as per instructions. But no example will run, all give errors.

Regards

Chris

Chris Hinsley

unread,
Dec 27, 2014, 7:24:05 AM12/27/14
to go...@googlegroups.com, chris....@gmail.com
Thanks, but they never get that far, several die with a 'GL/gflw3.h' not found or gflw.h not found, or SDL/SDL.h not found.

I have installed libsdl via macports too !

If I use quicklook, SDL.h and gflw3.h are present after macports install.

I'm rather stuck.

Chris

On Saturday, 27 December 2014 12:09:18 UTC, Jrago...@gmail.com wrote:
Which example?

I think all examples only use one Goroutine, so most should work most of the time, but some examples my need you to add

import "runtime"

func init() {
    runtime.LockOSThread()
}

Because OS X relies on you having all the window stuff on the main thread.

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

Chris Hinsley

unread,
Dec 27, 2014, 7:29:11 AM12/27/14
to go...@googlegroups.com, chris....@gmail.com
I'm trying to run:

go run ....../example_tests.go
go run ....../example.go

I also get a 'can't run *tests.go' error output.

Chris

Chris Hinsley

unread,
Dec 27, 2014, 8:44:34 AM12/27/14
to go...@googlegroups.com, chris....@gmail.com
I added those to .bash_profile help somwhat, but now I get this error:

go get github.com/go-gl/glfw3

# github.com/go-gl/glfw3

ld: library not found for -lglfw3

clang: error: linker command failed with exit code 1 (use -v to see invocation)


I did put the lib line in my profile as well as the include, FWIW.

Regards

Chris

On Saturday, 27 December 2014 12:30:58 UTC, Jrago...@gmail.com wrote:
I think I might have had this problem, I believe to fix it I had to find where macports installed the headers (/usr/local I think) and add it to my C_INCLUDE_PATH. So add the following line somewhere to your .profile

export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include

You may also need to do the same with LD_LIBRARY_PATH.

Chris Hinsley

unread,
Dec 27, 2014, 9:39:27 AM12/27/14
to go...@googlegroups.com, chris....@gmail.com
If I try this:

go get github.com/go-gl/examples

# github.com/go-gl/glfw

In file included from GoCode/src/github.com/go-gl/glfw/callback.go:7:

./callback.h:12:10: fatal error: 'GL/glfw.h' file not found

#include <GL/glfw.h>

         ^

1 error generated.

# github.com/banthar/Go-SDL/sdl

ld: warning: /System/Library/Frameworks//Cocoa.framework/Cocoa, ignoring unexpected dylib file

ld: warning: /System/Library/Frameworks//AppKit.framework/AppKit, ignoring unexpected dylib file



I have installed glew via macports, install seamed fine. I have no file glfw.h at all though. I do have glfw3.h but it's not in the GL directory ! Hope this might ring a bell with someone.

Regards

Chris

Chris Hinsley

unread,
Dec 27, 2014, 5:21:35 PM12/27/14
to go...@googlegroups.com, chris....@gmail.com
Thanks for the help, managed to get things working by source building the glfw3 libs. !

Regards

Chris

Dmitri Shuralyov

unread,
Dec 27, 2014, 6:21:32 PM12/27/14
to go...@googlegroups.com, chris....@gmail.com
It seems you've already figured it out, but I wonder, would it have helped you if this PR was merged and you saw that?


Although it mentions Linux, the linked file also has steps for OS X.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages