adamlwgriffiths / cyglfw3

Cython bindings for GLFW3
Other
20 stars 6 forks source link

cyglfw3/glfw3.so: undefined symbol: glfwCreateCursor #23

Closed Honghe closed 8 years ago

Honghe commented 8 years ago

Environment:

➜ ~ uname -a Linux honhe 4.4.0-38-generic #57~14.04.1-Ubuntu SMP Tue Sep 6 17:20:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

➜ ~ sudo apt-cache show libglfw3 Package: libglfw3 Source: glfw Priority: optional Section: libs Installed-Size: 107 Maintainer: Debian Games Team pkg-games-devel@lists.alioth.debian.org Architecture: amd64 Version: 3.0.4-1otb1~trusty2 Depends: libc6 (>= 2.15), libgl1-mesa-glx | libgl1, libx11-6 (>= 2:1.2.99.901), libxi6 (>= 2:1.2.99.4), libxrandr2 (>= 2:1.2.99.3), libxxf86vm1 Filename: pool/main/g/glfw/libglfw3_3.0.4-1otb1~trusty2_amd64.deb

➜ ~ pip list |grep cyglfw cyglfw3 (3.1.0.2)

Error:

In [1]: import cyglfw3
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-b8494abc98b6> in <module>()
----> 1 import cyglfw3

/usr/local/lib/python2.7/dist-packages/cyglfw3/__init__.py in <module>()
      5 from .version import __version__
      6 
----> 7 from .glfw3 import *
      8 

ImportError: /usr/local/lib/python2.7/dist-packages/cyglfw3/glfw3.so: undefined symbol: glfwCreateCursor
adamlwgriffiths commented 8 years ago

glfwCreateCursor was added in GLFW 3.1, you will have to update to 3.1 or newer.

http://www.glfw.org/docs/latest/group__input.html#gafca356935e10135016aa49ffa464c355

Honghe commented 8 years ago

Thanks. When I build and install GLFW, I forgot the last sudo ldconfig, so cyglfw3 can not find the new .so

$ cmake -D BUILD_SHARED_LIBS=ON ..
$ sudo make install
$ sudo ldconfig
adamlwgriffiths commented 8 years ago

Ah, thanks for posting those steps. It will help anyone else who runs into the same problem =)