View previous topic :: View next topic |
Author |
Message |
kib2
Joined: 08 Jun 2007 Posts: 6 Location: France
|
Posted: Mon Jul 09, 2007 3:27 am Post subject: Building the simple the 'hello wolrd' module |
|
|
Hi,
I'm trying to build the 'hello wolrd' module, but when I try to build it :
Code: | C:\Documents and Settings\kib\Bureau\D_essai\TestsPerso\Nouveau dossier>python s
etup.py build
running build
running build_ext
building 'testdll' extension
sources: ['testdll.d', 'python.d', 'class_wrap.d', 'ctor_wrap.d', 'def.d', 'dg_
convert.d', 'exception.d', 'func_wrap.d', 'iteration.d', 'lib_abstract.d', 'make
_object.d', 'op_wrap.d', 'pyd.d', 'pydobject.d', 'struct_wrap.d', 'pydmain.d', '
coroutine.d', 'stackcontext.d', 'stackthread.d', 'tls.d', 'Default.d', 'Demangle
.d', 'Nameof.d', 'Util.d', 'python_dll_windows_boilerplate.d']
c:\dmd\bin\dmd.exe -c -version=Python_2_5_Or_Later -version=Python_Unicode_UCS2
-debug -IC:\Python25\lib\site-packages\celerid\infrastructure\python\2.5 -IC:\Py
thon25\lib\site-packages\celerid\infrastructure -ofbuild\temp.win32-2.5\Release\
project\testdll.obj -version=Pyd_with_StackThreads testdll.d
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1948):
found 'ref' when expecting ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1948):
semicolon expected following function declaration
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1948):
Declaration expected, not ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1953):
found 'ref' when expecting ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1953):
semicolon expected following function declaration
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1953):
Declaration expected, not ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(3500):
unrecognized declaration
error: command 'c:\dmd\bin\dmd.exe' failed with exit status 1
C:\Documents and Settings\kib\Bureau\D_essai\TestsPerso\Nouveau dossier>python s
etup.py build
running build
running build_ext
building 'testdll' extension
sources: ['testdll.d', 'python.d', 'class_wrap.d', 'ctor_wrap.d', 'def.d', 'dg_
convert.d', 'exception.d', 'func_wrap.d', 'iteration.d', 'lib_abstract.d', 'make
_object.d', 'op_wrap.d', 'pyd.d', 'pydobject.d', 'struct_wrap.d', 'pydmain.d', '
coroutine.d', 'stackcontext.d', 'stackthread.d', 'tls.d', 'Default.d', 'Demangle
.d', 'Nameof.d', 'Util.d', 'python_dll_windows_boilerplate.d']
c:\dmd\bin\dmd.exe -c -version=Python_2_5_Or_Later -version=Python_Unicode_UCS2
-debug -IC:\Python25\lib\site-packages\celerid\infrastructure\python\2.5 -IC:\Py
thon25\lib\site-packages\celerid\infrastructure -ofbuild\temp.win32-2.5\Release\
project\testdll.obj -version=Pyd_with_StackThreads testdll.d
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1948):
found 'ref' when expecting ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1948):
semicolon expected following function declaration
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1948):
Declaration expected, not ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1953):
found 'ref' when expecting ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1953):
semicolon expected following function declaration
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(1953):
Declaration expected, not ')'
C:\Python25\lib\site-packages\celerid\infrastructure\python\2.5\python.d(3500):
unrecognized declaration
error: command 'c:\dmd\bin\dmd.exe' failed with exit status 1 |
Any idea ? |
|
Back to top |
|
|
KirkMcDonald
Joined: 22 Jun 2006 Posts: 23
|
Posted: Tue Jul 10, 2007 1:50 pm Post subject: |
|
|
Pyd RC1 has issues with the latest versions of DMD:
(1) The 'ref' keyword was added in DMD 1.011. The Python header used 'ref' as an identifier in a couple of places.
(2) StackThreads stopped working with DMD at some point.
The easiest fix is to use the svn HEAD version of Pyd. If you don't have svn or you don't want to install it, you can try this:
(1) Replace infrastructure/python/2.5/python.d with the one in svn.
(2) Set with_st=False in setup.py.
That said, using the svn version is probably best. The docs on the website refer to the svn version.
One final note: testdll is not a simple "hello world" module; it's more like a unit-test. The "hello" module is the simplest example module. |
|
Back to top |
|
|
kib2
Joined: 08 Jun 2007 Posts: 6 Location: France
|
Posted: Tue Jul 10, 2007 3:56 pm Post subject: |
|
|
Thank you KirkMcDonald,
I used the svn version and it works perfectly now.
Great work
Edit:
-----
Not all the samples in fact : the array test doesn't work at home
Code: | C:\Documents and Settings\kib\Bureau\D_essai\PyD\examples\arraytest>python setup.py install
running install
running build
running build_ext
running install_lib
copying build\lib.win32-2.5\arraytest.pyd -> C:\Python25\Lib\site-packages
running install_egg_info
Writing C:\Python25\Lib\site-packages\arraytest-0.1-py2.5.egg-info
C:\Documents and Settings\kib\Bureau\D_essai\PyD\examples\arraytest>python test.
py
>>> get()
get: [{0},{1},{2},{3},{4}]
[{0}, {1}, {2}, {3}, {4}]
>>> set([Foo(10), Foo(20)])
Traceback (most recent call last):
File "test.py", line 17, in <module>
set([Foo(10), Foo(20)])
RuntimeError: D Exception: pyd.make_object.PydConversionException: Couldn't conv
ert Python type 'Foo' to D type 'arraytest.Foo'
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|