Closed raff closed 10 years ago
We should probably not have the qml package itself depending on GL, actually. I've added similar linking instructions to the gl package instead. Can you please test it and see if it works for you? I'll push the changes in a moment.
Issue should be fixed after efd3a366e. Please let me know how it goes.
All changes work great! Thanks!
On Tue, Jan 28, 2014 at 8:16 AM, Gustavo Niemeyer notifications@github.comwrote:
Closed #35 https://github.com/niemeyer/qml/issues/35.
Reply to this email directly or view it on GitHubhttps://github.com/niemeyer/qml/issues/35 .
On OSX the OpenGL library is in a framework, so the "common" -lGL doesn't work. This should fix the problem:
diff --git a/bridge.go b/bridge.go index 3846217..629a810 100644 --- a/bridge.go +++ b/bridge.go @@ -10,7 +10,8 @@ package qml // #cgo CPPFLAGS: -I/usr/include/qt/QtCore/5.1.1/QtCore // #cgo CPPFLAGS: -I/usr/include/qt/QtQuick/5.1.1/QtQuick // #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing -DGL_GLEXT_PROTOTYPES -// #cgo LDFLAGS: -lstdc++ -lGL +// #cgo !darwin LDFLAGS: -lstdc++ -lGL +// #cgo darwin LDFLAGS: -lstdc++ -framework OpenGL // #cgo pkg-config: Qt5Core Qt5Widgets Qt5Quick Qt5OpenGL // // #include