[squeak-dev] How to log in console in Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] How to log in console in Windows

Mariano Martinez Peck
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


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to log in console in Windows

Igor Stasenko
2009/5/15 Mariano Martinez Peck <[hidden email]>:
> 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
>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to log in console in Windows

Eliot Miranda-2
In reply to this post by Mariano Martinez Peck


On Fri, May 15, 2009 at 7:36 AM, Mariano Martinez Peck <[hidden email]> 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






Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to log in console in Windows

Mariano Martinez Peck


On Fri, May 15, 2009 at 5:53 PM, Eliot Miranda <[hidden email]> wrote:


On Fri, May 15, 2009 at 7:36 AM, Mariano Martinez Peck <[hidden email]> 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










Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to log in console in Windows

Eliot Miranda-2


On Fri, May 15, 2009 at 12:04 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Fri, May 15, 2009 at 5:53 PM, Eliot Miranda <[hidden email]> wrote:


On Fri, May 15, 2009 at 7:36 AM, Mariano Martinez Peck <[hidden email]> 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 :)

 
Good luck!


Thanks for the help!
 



Thanks a lot in advance,

Mariano














Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to log in console in Windows

Igor Stasenko
In reply to this post by Mariano Martinez Peck
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 <[hidden email]>:

> 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
>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.