Re: How to avoid the console from apearing.

2010-08-17 Thread Steven Schveighoffer
On Tue, 17 Aug 2010 17:40:02 -0400, John Connors wrote: Hi. This is my entire program: import std.process: system; int main(string[] argv) { return system(r"bin\someprogram.exe"); } It works but a console (from my program) apears while someprogram.exe is running. I've read that so

Re: How to avoid the console from apearing.

2010-08-17 Thread John Connors
That worked. Thanks. Still wonder why execvp with a simple main() (someprogram.exe is not executed). But for now the WinMain() version will do. Thanks again.

Re: How to avoid the console from apearing.

2010-08-17 Thread Michal Minich
On Tue, 17 Aug 2010 22:27:19 +, John Connors wrote: > The console is still showing. Any ideas why? try std.process.execvp

Re: How to avoid the console from apearing.

2010-08-17 Thread John Connors
My small loader is not so small anymore. I've modified it according to the sample but the console is still showing: import core.runtime; import std.c.windows.windows; import std.process: system; extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS

Re: does anybody read my messages normally?

2010-08-17 Thread Stanislav Blinov
Nick Sabalausky wrote: "Stanislav Blinov" wrote in message news:i4era1$t6...@digitalmars.com... Hi, I wanted to test if anyone's having trouble reading my messages. Reason being, I looked into newsgroup today on my home machine and saw some very weird thing happening to my messages. I read a

Re: test: does anybody read my messages normally?

2010-08-17 Thread Stanislav Blinov
Michal Minich wrote: On Wed, 18 Aug 2010 00:28:41 +0400, Stanislav Blinov wrote: Hi, I wanted to test if anyone's having trouble reading my messages. Reason being, I looked into newsgroup today on my home machine and saw some very weird thing happening to my messages. I read and post mostly fr

Re: How to avoid the console from apearing.

2010-08-17 Thread Michael Parrott
Michal Minich Wrote: > On Tue, 17 Aug 2010 21:40:02 +, John Connors wrote: > > > Hi. > > > > This is my entire program: > > > > import std.process: system; > > > > int main(string[] argv) > > { > > return system(r"bin\someprogram.exe"); > > } > > > > It works but a console (from my pr

Re: How to avoid the console from apearing.

2010-08-17 Thread Yao G.
On Tue, 17 Aug 2010 16:40:02 -0500, John Connors wrote: [snip] It works but a console (from my program) apears while someprogram.exe is running. I've read that some optlink switches are needed to make the console disapear. Try using WinMain instead of main: --- import core.runtime; imp

Re: How to avoid the console from apearing.

2010-08-17 Thread Michal Minich
On Tue, 17 Aug 2010 22:01:06 +, Michal Minich wrote: >> Do you care to give me the correct switches? >> >> Thanks > > this example does not shows console. Maybe you can simplify it. > http://digitalmars.com/d/2.0/windows.html It was mentioned on NG that you don't need anymore WinMain and in

Re: How to avoid the console from apearing.

2010-08-17 Thread Michal Minich
On Tue, 17 Aug 2010 21:40:02 +, John Connors wrote: > Hi. > > This is my entire program: > > import std.process: system; > > int main(string[] argv) > { > return system(r"bin\someprogram.exe"); > } > > It works but a console (from my program) apears while someprogram.exe is > running

How to avoid the console from apearing.

2010-08-17 Thread John Connors
Hi. This is my entire program: import std.process: system; int main(string[] argv) { return system(r"bin\someprogram.exe"); } It works but a console (from my program) apears while someprogram.exe is running. I've read that some optlink switches are needed to make the console disapear. T

Re: does anybody read my messages normally?

2010-08-17 Thread Nick Sabalausky
"Stanislav Blinov" wrote in message news:i4era1$t6...@digitalmars.com... > Hi, > > I wanted to test if anyone's having trouble reading my messages. Reason > being, I looked into newsgroup today on my home machine and saw some very > weird thing happening to my messages. I read and post mostly f

Re: test: does anybody read my messages normally?

2010-08-17 Thread Michal Minich
On Wed, 18 Aug 2010 00:28:41 +0400, Stanislav Blinov wrote: > Hi, > > I wanted to test if anyone's having trouble reading my messages. Reason > being, I looked into newsgroup today on my home machine and saw some > very weird thing happening to my messages. I read and post mostly from > work via

Re: test: does anybody read my messages normally?

2010-08-17 Thread Ali Çehreli
Stanislav Blinov wrote: Hi, I wanted to test if anyone's having trouble reading my messages. Reason being, I looked into newsgroup today on my home machine and saw some very weird thing happening to my messages. I read and post mostly from work via mailing list as I don't have Internet connec

test: does anybody read my messages normally?

2010-08-17 Thread Stanislav Blinov
Hi, I wanted to test if anyone's having trouble reading my messages. Reason being, I looked into newsgroup today on my home machine and saw some very weird thing happening to my messages. I read and post mostly from work via mailing list as I don't have Internet connection there except for ma

Re: Error: identifier 'string' is not defined

2010-08-17 Thread Byron Heads
On Tue, 17 Aug 2010 19:31:58 +, Byron Heads wrote: > After upgrading an ubuntu machine from 2.047 to 2.048 I am getting an > error: > > /usr/include/d/dmd/phobos/std/traits.d(25): Error: identifier 'string' > is not defined > > I doesn't matter what I compile. > > I added > alias immutable(

Error: identifier 'string' is not defined

2010-08-17 Thread Byron Heads
After upgrading an ubuntu machine from 2.047 to 2.048 I am getting an error: /usr/include/d/dmd/phobos/std/traits.d(25): Error: identifier 'string' is not defined I doesn't matter what I compile. I added alias immutable(char[]) string to traits.d Then I get the following error. /usr/include/

Re: Reading stdin in Windows 7

2010-08-17 Thread Stanislav Blinov
17.08.2010 14:41, Stanislav Blinov wrote: write(line); [snip] writef(line); [snip] Sorry, both should be 'write'. --

Reading stdin in Windows 7

2010-08-17 Thread Stanislav Blinov
Hello, I'm receiving strange results with reading stdin on Windows 7. Consider this code: module test; import std.stdio; void main(string[] args) { foreach (int i, string line; lines(stdin)) { write(line); } } On Linux, if I do 'cat test.d | ./test'