First of all -s shouldn't exit but give you a Smalltalk shell. So I'd start
understanding why it exits. What if you perform syx.exe -s -r . using the
precompiled win32 binaries?
> I get no output where as if I use the exe in the binary distribution
> it works.
>
> ...\syx>"c:\Program Files\Syx\syx.exe" examples\basic\helloworld.st
>
> I get
>
> 'Hello world'
> Hello world displayed
> Hello world again
What's the source of helloworld.st? Do you get 3 times Hello world?
> any pointers would be appreciated.
> Im compiling in MS VS 2005 with no changes to the source files.
I've never compiled Syx under MSVC as it's been contributed, so I think
you should give us more information.
Best regards,
--
http://syx.googlecode.com - Smalltalk YX
http://lethalman.blogspot.com - Thoughts about computer technologies
http://www.debian.org - The Universal Operating System
Oh yes that's a bug of 0.1.7, my bad. Anyway you get an image of the same
size?
> The source of the helloworld.st is Src.syx-0.1.7.zip, in the examples
> \basic\ folder of the zip file.
So the output is right.
> I get no output from the version I compiled, but I get 3 "hello world"
> from the exe in the binary distribution.
That needs some debug on whether the interpreter runs the startup method and
it reads the file from the console arguments.
Could you test if:
o syx_initialize_system is being called (in syx/syx-init.c)
o test if the code under /* Now schedule to startup */ (in src/main.c) is
being called
o try doing commandLine commandLineArguments printNl under
st/kernel/SystemDictionary.st in the startupSystem method
> Can you please let me know what compiler ( and version ) was used to
> produce the exe in the windows binary distribution?
I use SCons as build system and MingW as compiler, for both win32 and wince.
> Thanks for the quick response.
Thanks for your interest and the help.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkoUWyAACgkQw9Qjꓜ䡶'훛�㧱됙ﯛ湎壺�
1ysAniJcosotX/GRSRov0hz1i/LDkKlX
=Fe9i
-----END PGP SIGNATURE-----
Seems to work correctly. The only problem then can be in fileIn. What if you
manually run:
syx.exe
> FileStream fileIn: 'examples\basic\helloworld.st'!
Thanks.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkoVun4ACgkQw9Qj+8Kak3G1LwCfWHsNv0Jtd20PijxOMH5xloNY
G3AAnj682CGXV+G1P9OomUVmKUXtBF3r
=qMX0
-----END PGP SIGNATURE-----
Maybe I've understood the problem... fstat.
FileStream upToEnd needs to know the size of the file, which currently can
be obtained only using fstat (in syx/syx-primitives.c; FileStream_fileOp
primitive; case 7). I didn't look for anything similar on Windows due to
lack of time, please consider reporting the bug, and if you want, creating a patch.
If MSVC has an fstat function, defining HAVE_FSTAT under msvc/syx-config.h
could be enough.
Let me know, thanks for you help.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkoW3bYACgkQw9Qj+8Kak3Gf9ACdG0ee1CSBzwLU+8BigGBYatxo
02AAnRdNnjSziDH0eeG5wqD8Dqp6EQ8X
=7aTp
-----END PGP SIGNATURE-----