From: nobu.nokada@... Date: 2003-09-11T12:07:58+09:00 Subject: Re: stdout in embedded ruby in win32 Hi, At Thu, 11 Sep 2003 06:09:58 +0900, thierry wilmot wrote: > I have just finished to convert my ruby embedded app from static ruby > lib (msvcrt-ruby18-static.lib) to dll, and have some problems with > standard stream stdin,stdout,stderr redirection in dll mode. My .exe is > not compile in console mode, but in windows mode. Link with msvcrt.dll. > a well works code in static lib : > > freopen("stdout.txt","w+",stdout); > > Does not work in dll mode, cause some unobvious Windows reasons a dll > have it own std streams, and if your freopen() streams in .exe, they > will not be redirected in the msvcrt-ruby18.dll Due to the specification of Windows DLL. And if you want to use extension libraries, you have to use ruby DLL or recompile all libraries to import symbols from your .exe. -- Nobu Nakada