SFML community forums
Bindings - other languages => Python => Topic started by: nonexistent on August 03, 2009, 12:41:47 am
-
Hello, I'm having some problems running PySFML programs. My system is 32-bit Arch Linux. I have python3.0 installed, and installed the full PySFML 1.5 SDK. If I try to run a simple hello world SFML program:
from PySFML import sf
window = sf.RenderWindow(sf.VideoMode(800, 600), "Floating")
text = sf.String("Hello SFML")
running = True
while running:
event = sf.Event()
while window.GetEvent(event):
if event.Type == sf.Event.Closed:
running = False
window.Clear(sf.Color.Black)
window.Draw(text)
window.Display()
I get the error:
Traceback (most recent call last):
File "ex1.py", line 2, in <module>
from PySFML import sf
ImportError: /usr/local/lib/python3.0/site-packages/PySFML/sf.so: undefined symbol: _ZNK2sf5Sound20IsRelativeToListenerEv
I tried editing the python setup.py installer as specified in http://www.sfml-dev.org/wiki/en/tutorials/installpysfml and reinstalling, but it made no difference.
Does anyone know what the problem is?
-
Make sure you have well installed the sfml librairies, with the good version.
-
Make sure you have well installed the sfml librairies, with the good version.
I am quite sure this is the case unless something is wrong with the following:
I downloaded SFML-1.5-sdk-linux-32.tar.gz and SFML-1.5-python-sdk.zip from the SFML downloads page. After extracting both I built and installed from the python folder from SFML-1.5-python-sdk.zip with "python3.0 setup.py build; sudo python3.0 setup.py install".
Still looking for a solution.
-
Remi, did you bind sf::Sound::SetRelativeToListener? It is a new function (maybe even the only one!) in SFML 1.5.
-
Remi, did you bind sf::Sound::SetRelativeToListener? It is a new function (maybe even the only one!) in SFML 1.5.
Yes, and there is also sf::Sound::IsRelativeToListener, see http://sfml.svn.sourceforge.net/viewvc/sfml/tags/1.5/python/src/Sound.cpp?r1=1056&r2=1064
So nonexistent you probably have an older version of sfml installed somewhere.
-
Remi, did you bind sf::Sound::SetRelativeToListener? It is a new function (maybe even the only one!) in SFML 1.5.
Yes, and there is also sf::Sound::IsRelativeToListener, see http://sfml.svn.sourceforge.net/viewvc/sfml/tags/1.5/python/src/Sound.cpp?r1=1056&r2=1064
So nonexistent you probably have an older version of sfml installed somewhere.
I have PySFML 1.4 installed for Python 2.6, but I do not think this would affect Python 3.0. Just to be safe, I removed the 1.4 files from site-packages for Python 2.6.
If I remove PySFML 1.5 from site-packages in Python 3.0 and try to run a PySFML program, I will get the error:
Traceback (most recent call last):
File "ex1.py", line 2, in <module>
from PySFML import sf
ImportError: No module named PySFML
If I then go back and rebuild and reinstall PySFML 1.5 from source as specified in my previous post, I still get this "undefined symbol: _ZNK2sf5Sound20IsRelativeToListenerEv" error.
So unless I am overlooking something I definitely do not have a conflict with an older PySFML.
-
So unless I am overlooking something I definitely do not have a conflict with an older PySFML.
I suggested a conflict with an older sfml, not an older pysfml. What does ls /usr/lib/libsfml* output ?
-
So unless I am overlooking something I definitely do not have a conflict with an older PySFML.
I suggested a conflict with an older sfml, not an older pysfml. What does ls /usr/lib/libsfml* output ?
Whoops... I've been parsing your posts with "sfml" automatically as "PySFML". You were right from the start, I had an old SFML 1.4 in my /usr/lib. I should probably read things more carefully... :oops: Anyway thanks, things are working now.
-
Anyway thanks, things are working now.
Great :)