Giter Site home page Giter Site logo

Can't build on Ubuntu 13.04 about glfw HOT 9 CLOSED

go-gl avatar go-gl commented on June 3, 2024
Can't build on Ubuntu 13.04

from glfw.

Comments (9)

dmitshur avatar dmitshur commented on June 3, 2024

Did you have a static or dynamic glfw3 library?

It used to be the case that you needed dynamic, but that seems to be changing over time.

from glfw.

fcorrea avatar fcorrea commented on June 3, 2024

Quite frankly, no idea. I grabbed the glfw3 sources, generated the make files, compiled and installed. Not sure what's the default there.
In this case it seems to be dynamic since I had to link all the other libraries, correct?

from glfw.

tapir avatar tapir commented on June 3, 2024

Use cmake -DBUILD_SHARED_LIBS=ON.

Right now we're only using static lib on mac os because of the mentioned
reasons in that issue.

Most linux distributions come with the dyanmic library.
On Aug 6, 2013 7:31 AM, "Fernando Correa Neto" [email protected]
wrote:

Quite frankly, no idea. I grabbed the glfw3 sources, generated the make
files, compiled and installed. Not sure what's the default there.
In this case it seems to be dynamic since I had to link all the other
libraries, correct?


Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-22157798
.

from glfw.

 avatar commented on June 3, 2024

I used cmake -DBUILD_SHARED_LIBS=ON. Still could not go install.
Do the trick as fcorrea mentioned, go install ok.

Is there any method one could tell whether the compiled libglfw.so and libglfw3.a is static or dynamic?
Thanks.

from glfw.

tapir avatar tapir commented on June 3, 2024

*.so = shared object
*.a = static library

can you try to do this:

export LD_LIBRARY_PATH="/path/to/libglfw.so/"
go build github.com/go-gl/glfw3

from glfw.

 avatar commented on June 3, 2024

It's weird.

I do have those .so files:

:/usr/local/lib$ ls
cmake libglfw.so libglfw.so.3.0 python2.7 site_ruby
libglfw3.a libglfw.so.3 pkgconfig R x86_64-linux-gnu

Still cannot build.

export LD_LIBRARY_PATH="/usr/local/lib/libglfw.so/"
go build github.com/go-gl/glfw3

I rm -rf the glfw3 directory, and go get again, still those errors:

github.com/go-gl/glfw3

/usr/local/lib/libglfw3.a(context.c.o): In function parseGLVersion': context.c:(.text+0x53): undefined reference toglGetString'
/usr/local/lib/libglfw3.a(context.c.o): In function _glfwRefreshContextAttribs': context.c:(.text+0x907): undefined reference toglGetIntegerv'
context.c:(.text+0x98a): undefined reference to glGetIntegerv' context.c:(.text+0x9df): undefined reference toglGetIntegerv'
context.c:(.text+0xa32): undefined reference to glGetIntegerv' /usr/local/lib/libglfw3.a(context.c.o): In functionglfwExtensionSupported':
context.c:(.text+0xd59): undefined reference to glGetString' context.c:(.text+0xd93): undefined reference toglGetIntegerv'
/usr/local/lib/libglfw3.a(gamma.c.o): In function glfwSetGamma': gamma.c:(.text+0x182): undefined reference topow'
/usr/local/lib/libglfw3.a(window.c.o): In function glfwCreateWindow': window.c:(.text+0x6f8): undefined reference toglClear'
/usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function writeTargetToProperty': x11_clipboard.c:(.text+0x112): undefined reference toXChangeProperty'
x11_clipboard.c:(.text+0x238): undefined reference to XChangeProperty' x11_clipboard.c:(.text+0x2ad): undefined reference toXChangeProperty'
x11_clipboard.c:(.text+0x2b9): undefined reference to XFree' x11_clipboard.c:(.text+0x2f3): undefined reference toXInternAtom'
x11_clipboard.c:(.text+0x331): undefined reference to XChangeProperty' x11_clipboard.c:(.text+0x3d1): undefined reference toXChangeProperty'
/usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function _glfwHandleSelectionRequest': x11_clipboard.c:(.text+0x50e): undefined reference toXSendEvent'
/usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function _glfwPushSelectionToManager': x11_clipboard.c:(.text+0x57e): undefined reference toXConvertSelection'
x11_clipboard.c:(.text+0x59e): undefined reference to XCheckIfEvent' /usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function_glfwPlatformSetClipboardString':
x11_clipboard.c:(.text+0x662): undefined reference to XSetSelectionOwner' x11_clipboard.c:(.text+0x67b): undefined reference toXGetSelectionOwner'
..... and more

from glfw.

tapir avatar tapir commented on June 3, 2024

It should be

export LD_LIBRARY_PATH="/usr/local/lib/"

But if you don't want to do this everytime you're using glfw3, you can configure glfw with -DCMAKE_INSTALL_PREFIX=/usr when running cmake. Then it will install everything under /usr/lib which should be automatically found by cgo.

from glfw.

 avatar commented on June 3, 2024

export still has no effect:

export LD_LIBRARY_PATH="/usr/local/lib/"

I make the glfw3 with the option as you told, everything is ok now.

cmake .. -DCMAKE_INSTALL_PREFIX=/usr
sudo make
sudo make install

Thank you very much.

from glfw.

tapir avatar tapir commented on June 3, 2024

no problem

from glfw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.