PYX problem

76 views
Skip to first unread message

Bartosz Sawicki

unread,
Mar 27, 2012, 8:52:28 AM3/27/12
to agr...@googlegroups.com
I have a compilation problem (code from hpfem/master)
make[1]: Entering directory `/home/sawickib/agros2d/src'
make[1]: *** No rule to make target `python/agros2d.cpp', needed by `build/pythonlabagros.o'.  Stop.

It seems agros2d.pyx should be translated into agros2d.cpp. But when I called pyrecx:

~/agros2d/src/python$ pyrexc agros2d.pyx 
/usr/lib/python2.6/dist-packages/Pyrex/Compiler/Scanning.py:39: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/home/sawickib/agros2d/src/python/agros2d.pyx:4:11: Empty declarator
/home/sawickib/agros2d/src/python/agros2d.pyx:4:20: Syntax error in C variable declaration

Could you help me, please :)

regrds.


Pavel Karban

unread,
Mar 27, 2012, 9:02:03 AM3/27/12
to agr...@googlegroups.com
Hi Bartek,

could you try to run

cython --cplus agros2d.pyx

It should be done automatically during qmake stage.

Pavel

> --
> You received this message because you are subscribed to the Google
> Groups "Agros2D" group.
> To post to this group, send email to agr...@googlegroups.com.
> To unsubscribe from this group, send email to
> agros2d+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/agros2d?hl=en.

Bartosz Sawicki

unread,
Mar 30, 2012, 10:41:26 AM3/30/12
to agr...@googlegroups.com
Hi Pavel, 

Thanks for help, but it doesn't solve the problem. What version of cython are you using?

sawickib@sawickib-desktop:~/agros2d/src/python$ cython --cplus agros2d.pyx 

Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef extern from "../pythonlabagros.h":
    # PyParticleTracing
    cdef cppclass PyParticleTracing:
        PyParticleTracing()

        void setInitialPosition(double x, double y) except +
            ^
------------------------------------------------------------

/home/sawickib/agros2d/src/python/agros2d.pyx:21:13: Syntax error in simple statement list

sawickib@sawickib-desktop:~/agros2d/src/python$ cython --version
Cython version 0.11.2

regrds.


To unsubscribe from this group, send email to agros2d+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/agros2d?hl=en.
--
You received this message because you are subscribed to the Google Groups "Agros2D" group.
To post to this group, send email to agr...@googlegroups.com.
To unsubscribe from this group, send email to agros2d+unsubscribe@googlegroups.com.

Bartosz Sawicki

unread,
May 30, 2012, 8:40:07 AM5/30/12
to agr...@googlegroups.com
I still have problems with compilation, strange syntax error in pyx file.
Do you have idea what could be the reason? 

regrds,

Mach František

unread,
Jun 6, 2012, 3:05:57 AM6/6/12
to agr...@googlegroups.com
Hi Bartek,
could you please send me the output of command:

cython --cplus src/python/agros2d.pyx

Thank you,
Frank

2012/5/30 Bartosz Sawicki <sawi...@gmail.com>
To unsubscribe from this group, send email to agros2d+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/agros2d?hl=en.

Mach František

unread,
Jun 6, 2012, 3:39:33 AM6/6/12
to agr...@googlegroups.com
I'm sorry, I didn't notice your previous email with error output. In Agros2D 2.0, C++ wrappers  are used and for this feature you need Cython v0.13 (http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html).


Franek

2012/6/6 Mach František <mach.fr...@gmail.com>
Reply all
Reply to author
Forward
0 new messages