X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: "cout" and "cerr" won't work after cygwin1.dll init from VC++ Date: Tue, 19 Dec 2006 20:36:05 -0000 Message-ID: <002101c723ad$4e254c10$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <20061219210916.isuasdydhw4cwcc4@webmail.unizar.es> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 19 December 2006 20:09, Francisco J. Royo Santas wrote: > I have a VC++ program that uses a Cygwin-compiled DLL. I can init > cygwin1.dll but, after doing this, cout and cerr stop working. cout << > "Message" << endl does not appear on the screen. I do not know exactly what > happens here. The program is: > > cout << "Before" << endl; // Appears > HMODULE cygwinDll = LoadLibrary("cygwin1.dll"); > void (*init)() = (void (__cdecl *)(void)) GetProcAddress(cygwinDll, > "cygwin_dll_init"); > init(); > cout << "After" << endl; // Does nor appear No, that is not the program, that is a not-very-useful non-compiling snippet. > What is going on here?? What do I have to do to have cout and cerr back > normally?? You probably ignored step 1. http://cygwin.com/faq/faq.programming.html#faq.programming.msvs-mingw cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/