Hi folks!
I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ?
Thanks a lot in advance,
Mariano
2009/5/15 Mariano Martinez Peck marianopeck@gmail.com:
Hi folks!
I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ?
I don't see other options than recompiling VM to use main() entry point instead of winMain().
Thanks a lot in advance,
Mariano
On Fri, May 15, 2009 at 7:36 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi folks!
I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ?
Yes; recompile using the -mconsole flag insterad of the -mwindows flag. I think it's in LDFLAGS.
Thanks a lot in advance,
Mariano
On Fri, May 15, 2009 at 5:53 PM, Eliot Miranda eliot.miranda@gmail.comwrote:
On Fri, May 15, 2009 at 7:36 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi folks!
I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ?
Yes; recompile using the -mconsole flag insterad of the -mwindows flag. I think it's in LDFLAGS.
Mmmm I though there could be a way to do it without having to compile :( . I have never did this in windows. Is is explained somewhere how to compile Squeak for windows?
Thanks for the help!
Thanks a lot in advance,
Mariano
On Fri, May 15, 2009 at 12:04 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
On Fri, May 15, 2009 at 5:53 PM, Eliot Miranda eliot.miranda@gmail.comwrote:
On Fri, May 15, 2009 at 7:36 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi folks!
I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ?
Yes; recompile using the -mconsole flag insterad of the -mwindows flag. I think it's in LDFLAGS.
Mmmm I though there could be a way to do it without having to compile :( . I have never did this in windows. Is is explained somewhere how to compile Squeak for windows?
It's not so hard :)
http://www.squeakvm.org/win32/compiling.html
Good luck!
Thanks for the help!
Thanks a lot in advance,
Mariano
Another option, would be to redirect stdin/stdout using STDC library facilities to own stream(s). But you need to know how the external library links with STDC library, to be able to redirect these streams. I don't remember details, but i suppose it is possible.
2009/5/15 Mariano Martinez Peck marianopeck@gmail.com:
Hi folks!
I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ?
Thanks a lot in advance,
Mariano
squeak-dev@lists.squeakfoundation.org