0

I've had to fight to get this library to run. I can import it and the samples_cpp works fine. But when I run my roguelike, I get this error:

> python main.py
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    import libtcodpy as libtcod
  File "/home/slumking/Documents/Python/scripts/hm_game-master/libtcodpy.py", line 479, in <module>
    _lib.TCOD_console_has_mouse_focus.restype = c_bool
  File "/usr/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ./libtcod.so: undefined symbol: TCOD_console_has_mouse_focus
acollection_
  • 191
  • 10
  • The function `TCOD_console_has_mouse_focus()` was added in version 1.5.2 of `libtcod`. Which version is installed on your system? – BlackJack Sep 01 '15 at 16:19
  • 1.5.1 I thought that was the latest.. I can't find 1.5.2. It just says 'work in progress' on the site. – acollection_ Sep 01 '15 at 17:16
  • Then you maybe should downgrade your Python wrapper to one that wraps the stable version 1.5.1 instead of 1.5.2. – BlackJack Sep 01 '15 at 22:23
  • Do you mean my python version? How would one go about doing that? – acollection_ Sep 02 '15 at 13:19
  • No not the Python version, the version of _libtcodpy.py_. That module obviously needs `libtcod` 1.5.2. Maybe there is an older version of the module for version 1.5.1. – BlackJack Sep 02 '15 at 13:39

0 Answers0