Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: PySFML 2?  (Read 13467 times)

0 Members and 1 Guest are viewing this topic.

bastien

  • Full Member
  • ***
  • Posts: 231
    • View Profile
    • http://bastien-leonard.alwaysdata.net
PySFML 2?
« Reply #15 on: March 12, 2012, 09:04:16 am »
It looks like you don't have the latest SFML. The classes it doesn't find have been added pretty recently. Install it directly from git: https://aur.archlinux.org/packages.php?ID=48026
Check out pysfml-cython, an up to date Python 2/3 binding for SFML 2: https://github.com/bastienleonard/pysfml-cython

shackra

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://swt.encyclomundi.org
PySFML 2?
« Reply #16 on: March 13, 2012, 02:39:35 am »
Quote from: "bastien"
It looks like you don't have the latest SFML. The classes it doesn't find have been added pretty recently. Install it directly from git: https://aur.archlinux.org/packages.php?ID=48026


Nop. I uninstalled the old sfml-1.99 and then installed that package, so, I tried again with your bindings, but the error look exactly the same, even starting with:

Code: [Select]
In file included from src/sf.cpp:241:0:
src/hacks.hpp:45:41: error: ‘Transformable’ no es un miembro de ‘sf’


:(

GNU User
Python programmer
Blog

bastien

  • Full Member
  • ***
  • Posts: 231
    • View Profile
    • http://bastien-leonard.alwaysdata.net
PySFML 2?
« Reply #17 on: March 13, 2012, 09:04:41 am »
Ah, it looks like Transformable.hpp isn't included in Graphics.hpp: http://sfml-dev.org/documentation/2.0/Graphics_8hpp_source.php

Try to add #include <SFML/Graphics/Transformable.hpp>. Even if that fixes it, it's pretty weird because I don't have any problem when compiling.
I build directly from Git instead of using the AUR though, but it should give the same result.
Check out pysfml-cython, an up to date Python 2/3 binding for SFML 2: https://github.com/bastienleonard/pysfml-cython

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
PySFML 2?
« Reply #18 on: March 13, 2012, 09:50:08 am »
Quote
Ah, it looks like Transformable.hpp isn't included in Graphics.hpp

True, but it is included by many other classes (Sprite, Text, Shape, ...) so that shouldn't be an issue.
Laurent Gomila - SFML developer

bastien

  • Full Member
  • ***
  • Posts: 231
    • View Profile
    • http://bastien-leonard.alwaysdata.net
PySFML 2?
« Reply #19 on: March 13, 2012, 01:30:44 pm »
That's strange, because the file includes hacks.hpp which includes SFML/Graphics.hpp. I have added an explicit include of Transformable.hpp to make sure it's recognized.
Check out pysfml-cython, an up to date Python 2/3 binding for SFML 2: https://github.com/bastienleonard/pysfml-cython

shackra

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://swt.encyclomundi.org
PySFML 2?
« Reply #20 on: March 13, 2012, 05:22:38 pm »
Quote
Quote from: bastien
That's strange, because the file includes hacks.hpp which includes SFML/Graphics.hpp. I have added an explicit include of Transformable.hpp to make sure it's recognized.


Just to be sure, this is the output of sfml-git package been compiled from AUR, I added that line, but:

nothing...

Code: [Select]
jorge@Abril:~/MYAUR/python2-pysfml2-git$ rm -fr src/pysfml2-cython-build/
jorge@Abril:~/MYAUR/python2-pysfml2-git$ makepkg -si
==> Determinando ultima revisión de git...
  -> Versión encontrada: 20120313
==> Creando el paquete: python2-pysfml2-git 20120313-1 (mar 13 mar 10:06:46 CST 2012)
==> Resolviendo dependencias...
==> Verificando conflictos...
==> Obteniendo fuentes...
==> Descomprimiendo fuentes...
==> Eliminando el directorio pkg/...
==> Iniciando build()...
==> Connecting to GIT server....
Already up-to-date.
==> The local files are updated.
==> GIT checkout done or server timeout
==> Starting make...
Cloning into '/home/jorge/MYAUR/python2-pysfml2-git/src/pysfml2-cython-build'...
done.
running build
running build_ext
cythoning src/sf.pyx to src/sf.cpp
building 'sf' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python2.7 -c src/sf.cpp -o build/temp.linux-x86_64-2.7/src/sf.o
In file included from src/sf.cpp:241:0:
src/hacks.hpp:45:41: error: ‘Transformable’ no es un miembro de ‘sf’
src/hacks.hpp:45:60: error: ‘t’ no se declaró en este ámbito
src/hacks.hpp:73:53: error: ‘sf::RenderStates’ no se ha declarado
src/hacks.hpp:98:29: error: ‘sf::Time’ no se ha declarado
src/sf.cpp:455:3: error: ‘Transformable’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:495:3: error: ‘Vertex’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:534:3: error: ‘Time’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:559:3: error: ‘ContextSettings’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:636:3: error: ‘Texture’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:663:3: error: ‘Transform’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:688:3: error: ‘Shader’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:836:3: error: ‘RenderStates’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:1049:22: error: ‘Int64’ en el espacio de nombres ‘sf’ no nombra un tipo
src/sf.cpp:1051:69: error: ‘__Pyx_PyInt_to_py_sf__Int64’ se declaró como una variable ‘inline’
src/sf.cpp:1051:60: error: ‘Int64’ no es un miembro de ‘sf’
src/sf.cpp:1255:76: error: ‘Transform’ no es un miembro de ‘sf’
src/sf.cpp:1255:91: error: expected primary-expression before ‘)’ token
src/sf.cpp:1256:77: aviso: ‘wrap_time_instance’ inicializado y declarado como ‘extern’ [activado por defecto]
src/sf.cpp:1256:73: error: ‘Time’ no es un miembro de ‘sf’
src/sf.cpp:1256:83: error: expected primary-expression before ‘)’ token
src/sf.cpp:1265:72: error: ‘Texture’ no es un miembro de ‘sf’
src/sf.cpp:1265:85: error: expected primary-expression before ‘,’ token
src/sf.cpp:1265:87: error: expected primary-expression before ‘int’
src/sf.cpp:1265:90: error: se trata la lista de expresiones como una expresión compuesta en en inicializador [-fpermissive]
src/sf.cpp:1266:70: error: ‘Vertex’ no es un miembro de ‘sf’
src/sf.cpp:1266:82: error: expected primary-expression before ‘)’ token
src/sf.cpp:1269:70: error: ‘Shader’ no es un miembro de ‘sf’
src/sf.cpp:1269:82: error: expected primary-expression before ‘,’ token
src/sf.cpp:1269:84: error: expected primary-expression before ‘int’
src/sf.cpp:1269:87: error: se trata la lista de expresiones como una expresión compuesta en en inicializador [-fpermissive]
src/sf.cpp:1270:89: error: ‘ContextSettings’ no es un miembro de ‘sf’
src/sf.cpp:1270:110: error: expected primary-expression before ‘)’ token
src/sf.cpp:1271:94: aviso: ‘wrap_render_states_instance’ inicializado y declarado como ‘extern’ [activado por defecto]
src/sf.cpp:1271:90: error: ‘RenderStates’ no es un miembro de ‘sf’
src/sf.cpp:1271:108: error: expected primary-expression before ‘)’ token
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_5Mouse_is_button_pressed(PyObject*, PyObject*)’:
src/sf.cpp:2745:15: error: ‘isButtonPressed’ no es un miembro de ‘sf::Mouse’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_5Mouse_1get_position(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:2843:19: error: ‘getPosition’ no es un miembro de ‘sf::Mouse’
src/sf.cpp:2855:19: error: ‘getPosition’ no es un miembro de ‘sf::Mouse’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_5Mouse_2set_position(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:3016:5: error: ‘setPosition’ no es un miembro de ‘sf::Mouse’
src/sf.cpp:3028:5: error: ‘setPosition’ no es un miembro de ‘sf::Mouse’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_8Joystick_is_connected(PyObject*, PyObject*)’:
src/sf.cpp:3081:15: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_8Joystick_1get_button_count(PyObject*, PyObject*)’:
src/sf.cpp:3135:43: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_8Joystick_2has_axis(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:3225:15: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp:3225:15: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp:3225:15: error: expected ‘)’ before ‘__pyx_v_axis’
src/sf.cpp:3225:113: error: expected ‘)’ before ‘;’ token
src/sf.cpp:3225:113: error: expected ‘)’ before ‘;’ token
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_8Joystick_3is_button_pressed(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:3315:15: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_8Joystick_4get_axis_position(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:3405:38: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp:3405:88: error: ‘sf::Joystick’ no se ha declarado
src/sf.cpp:3405:103: error: expected ‘)’ before ‘__pyx_v_axis’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_8Keyboard_is_key_pressed(PyObject*, PyObject*)’:
src/sf.cpp:3459:15: error: ‘sf::Keyboard’ no se ha declarado
src/sf.cpp:3459:15: error: ‘sf::Keyboard’ no se ha declarado
src/sf.cpp:3459:15: error: expected ‘)’ before ‘__pyx_v_key’
src/sf.cpp:3459:98: error: expected ‘)’ before ‘;’ token
src/sf.cpp:3459:98: error: expected ‘)’ before ‘;’ token
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_7IntRect_4left___get__(PyObject*)’:
src/sf.cpp:3706:86: error: ‘sf::IntRect’ no tiene un miembro llamado ‘left’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_7IntRect_4left_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:3758:59: error: ‘sf::IntRect’ no tiene un miembro llamado ‘left’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_7IntRect_3top___get__(PyObject*)’:
src/sf.cpp:3791:86: error: ‘sf::IntRect’ no tiene un miembro llamado ‘top’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_7IntRect_3top_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:3843:59: error: ‘sf::IntRect’ no tiene un miembro llamado ‘top’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_7IntRect_5width___get__(PyObject*)’:
src/sf.cpp:3876:86: error: ‘sf::IntRect’ no tiene un miembro llamado ‘width’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_7IntRect_5width_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:3928:59: error: ‘sf::IntRect’ no tiene un miembro llamado ‘width’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_7IntRect_6height___get__(PyObject*)’:
src/sf.cpp:3961:86: error: ‘sf::IntRect’ no tiene un miembro llamado ‘height’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_7IntRect_6height_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:4013:59: error: ‘sf::IntRect’ no tiene un miembro llamado ‘height’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_7IntRect_3contains(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:4092:15: error: ‘sf::IntRect’ no tiene un miembro llamado ‘contains’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_7IntRect_4intersects(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:4197:17: error: ‘sf::IntRect’ no tiene un miembro llamado ‘intersects’
src/sf.cpp:4222:17: error: ‘sf::IntRect’ no tiene un miembro llamado ‘intersects’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9FloatRect_4left___get__(PyObject*)’:
src/sf.cpp:4677:92: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘left’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_9FloatRect_4left_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:4729:61: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘left’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9FloatRect_3top___get__(PyObject*)’:
src/sf.cpp:4762:92: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘top’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_9FloatRect_3top_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:4814:61: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘top’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9FloatRect_5width___get__(PyObject*)’:
src/sf.cpp:4847:92: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘width’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_9FloatRect_5width_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:4899:61: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘width’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9FloatRect_6height___get__(PyObject*)’:
src/sf.cpp:4932:92: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘height’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_9FloatRect_6height_1__set__(PyObject*, PyObject*)’:
src/sf.cpp:4984:61: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘height’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9FloatRect_3contains(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:5063:15: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘contains’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9FloatRect_4intersects(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:5168:17: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘intersects’
src/sf.cpp:5193:17: error: ‘sf::FloatRect’ no tiene un miembro llamado ‘intersects’
src/sf.cpp: En la función ‘int __pyx_pf_2sf_9Transform___init__(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:7141:53: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7141:66: error: se esperaba un especificador de tipo
src/sf.cpp:7141:66: error: se esperaba ‘;’
src/sf.cpp: En la función ‘void __pyx_pf_2sf_9Transform_1__dealloc__(PyObject*)’:
src/sf.cpp:7168:60: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_2__str__(PyObject*)’:
src/sf.cpp:7216:75: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_3__mul__(PyObject*, PyObject*)’:
src/sf.cpp:7389:3: error: ‘Transform’ no es un miembro de ‘sf’
src/sf.cpp:7389:18: error: ‘__pyx_v_p_t’ no se declaró en este ámbito
src/sf.cpp:7480:25: error: se esperaba un especificador de tipo
src/sf.cpp:7480:25: error: se esperaba ‘;’
src/sf.cpp:7489:75: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7489:136: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7499:79: error: no se puede usar ‘__pyx_f_2sf_wrap_transform_instance’ como una función
src/sf.cpp:7536:75: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_6matrix___get__(PyObject*)’:
src/sf.cpp:7629:75: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_4combine(PyObject*, PyObject*)’:
src/sf.cpp:7713:3: error: ‘Transform’ no es un miembro de ‘sf’
src/sf.cpp:7713:18: error: ‘__pyx_v_p’ no se declaró en este ámbito
src/sf.cpp:7730:19: error: se esperaba un especificador de tipo
src/sf.cpp:7730:19: error: se esperaba ‘;’
src/sf.cpp:7739:70: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7739:142: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7749:73: error: no se puede usar ‘__pyx_f_2sf_wrap_transform_instance’ como una función
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_5get_inverse(PyObject*, PyObject*)’:
src/sf.cpp:7777:3: error: ‘Transform’ no es un miembro de ‘sf’
src/sf.cpp:7777:18: error: ‘__pyx_v_p’ no se declaró en este ámbito
src/sf.cpp:7793:19: error: se esperaba un especificador de tipo
src/sf.cpp:7793:19: error: se esperaba ‘;’
src/sf.cpp:7802:70: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7812:73: error: no se puede usar ‘__pyx_f_2sf_wrap_transform_instance’ como una función
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_6rotate(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:7937:55: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:7975:55: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_7scale(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:8146:55: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp:8183:55: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_8transform_point(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:8305:65: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_9transform_rect(PyObject*, PyObject*)’:
src/sf.cpp:8381:70: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En la función ‘PyObject* __pyx_pf_2sf_9Transform_10translate(PyObject*, PyObject*, PyObject*)’:
src/sf.cpp:8479:53: error: ‘struct __pyx_obj_2sf_Transform’ no tiene un miembro llamado ‘p_this’
src/sf.cpp: En el ámbito global:
src/sf.cpp:8508:80: error: redefinición de ‘__pyx_obj_2sf_Transform* __pyx_f_2sf_wrap_transform_instance’
src/sf.cpp:1255:40: error: se define ‘__pyx_obj_2sf_Transform* __pyx_f_2sf_wrap_transform_instance’ previamente aquí
src/sf.cpp:8508:76: error: ‘Transform’ no es un miembro de ‘sf’
src/sf.cpp:8508:91: error: ‘__pyx_v_p_cpp_instance’ no se declaró en este ámbito
src/sf.cpp:1022:27: aviso: se usa la función inline ‘void __Pyx_ExceptionSave(PyObject**, PyObject**, PyObject**)’ pero nunca se define [activado por defecto]
src/sf.cpp:291:26: aviso: se usa la función inline ‘int __Pyx_PyObject_IsTrue(PyObject*)’ pero nunca se define [activado por defecto]
src/sf.cpp:996:27: aviso: se usa la función inline ‘void __Pyx_ErrRestore(PyObject*, PyObject*, PyObject*)’ pero nunca se define [activado por defecto]
src/sf.cpp:894:27: aviso: se usa la función inline ‘void __Pyx_RaiseUnboundLocalError(const char*)’ pero nunca se define [activado por defecto]
src/sf.cpp:1071:26: aviso: se usa la función inline ‘int __Pyx_PyInt_AsInt(PyObject*)’ pero nunca se define [activado por defecto]
src/sf.cpp:909:27: aviso: se usa la función inline ‘void __Pyx_RaiseTooManyValuesError(Py_ssize_t)’ pero nunca se define [activado por defecto]
src/sf.cpp:907:27: aviso: se usa l[/quote]a función inline ‘void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t)’ pero nunca se define [activado por defecto]
src/sf.cpp:1065:35: aviso: se usa la función inline ‘unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject*)’ pero nunca se define [activado por defecto]
src/sf.cpp:920:26: aviso: se usa la función inline ‘int __Pyx_TypeTest(PyObject*, PyTypeObject*)’ pero nunca se define [activado por defecto]
error: command 'gcc' failed with exit status 1
==> ERROR: Se produjo un error en build().
    Cancelando...
jorge@Abril:~/MYAUR/python2-pysfml2-git$


then I decided to use the typical method, just python setup.py build. then a different error appears:

Code: [Select]
jorge @ April: ~ / $ python setup.py build MYAUR/python2-pysfml2-git/src/pysfml2-cython
running build
running build_ext
cythoning src / sf.pyx to src / sf.cpp
building 'sf' extension
Creating build
Creating build/temp.linux-x86_64-2.7
Creating build/temp.linux-x86_64-2.7/src
gcc-pthread-fno-strict-aliasing-march = x86-64-mtune = generic-O2-pipe-fstack-protector - param = ssp-buffer-size = 4-D_FORTIFY_SOURCE = 2-DNDEBUG-march = x86-64 -mtune = generic-O2-pipe-fstack-protector - param = ssp-buffer-size = 4-D_FORTIFY_SOURCE = 2-fPIC -I/usr/include/python2.7-c src / sf.cpp-o build / temp.linux-x86_64-2.7/src/sf.o
In file included from / usr / include / SFML / Graphics / Transformable.hpp: 32:0,
                 from src / hacks.hpp: 35,
                 from src / sf.cpp: 241:
/ Usr / include / SFML / Graphics / Transform.hpp: 42:25: error: variable 'sf sf :: Transform :: SFML_API_IMPORT' has initializer but incomplete type
/ Usr / include / SFML / Graphics / Transform.hpp: 44:1: error: expected primary-expression before 'public'
/ Usr / include / SFML / Graphics / Transform.hpp: 44:1: error: expected '}' before 'public'
/ Usr / include / SFML / Graphics / Transform.hpp: 44:1: error: expected ',' or ';' before 'public'
/ Usr / include / SFML / Graphics / Transform.hpp: 70:47: error: expected constructor, destructor, or type conversion before ';' token
/ Usr / include / SFML / Graphics / Transform.hpp: 87:30: error: non-member function 'const float * sf :: getMatrix ()' can not have cv-qualifier
/ Usr / include / SFML / Graphics / Transform.hpp: 98:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 109:47: error: non-member function 'sf sf :: :: Vector2f transformPoint (float, float)' can not have cv-qualifier
/ Usr / include / SFML / Graphics / Transform.hpp: 119:52: error: non-member function 'sf sf :: :: Vector2f transformPoint (Vector2f const &)' can not have cv-qualifier
/ Usr / include / SFML / Graphics / Transform.hpp: 135:57: error: non-member function 'sf sf :: :: FloatRect transformRect (FloatRect const &)' can not have cv-qualifier
/ Usr / include / SFML / Graphics / Transform.hpp: 149:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 169:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 188:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 207:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 233:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 258:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 278:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 305:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 324:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 349:5: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 354:18: error: 'Transform' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 356:1: error: expected unqualified-id before 'private'
/ Usr / include / SFML / Graphics / Transform.hpp: 376:1: error: 'SFML_API_IMPORT' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 390:1: error: 'SFML_API_IMPORT' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 404:1: error: 'SFML_API_IMPORT' does not name a type
/ Usr / include / SFML / Graphics / Transform.hpp: 406:1: error: expected declaration before '}' token
error: command 'gcc' failed with exit status 1
jorge @ April: ~ / $ MYAUR/python2-pysfml2-git/src/pysfml2-cython

GNU User
Python programmer
Blog

bastien

  • Full Member
  • ***
  • Posts: 231
    • View Profile
    • http://bastien-leonard.alwaysdata.net
PySFML 2?
« Reply #21 on: March 13, 2012, 11:01:41 pm »
Could it be related to the fact that you're on a 64 bits system? Can you try to build a 32 bits module? (I guess you need to play with the --plat-name option.)
Check out pysfml-cython, an up to date Python 2/3 binding for SFML 2: https://github.com/bastienleonard/pysfml-cython

 

anything