Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20011111035830.68472.qmail@web21009.mail.yahoo.com> Date: Sat, 10 Nov 2001 19:58:30 -0800 (PST) From: Evan Pollan Subject: Cygwin && C++ POSIX threads support? To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii All-- I've been blissfully submerged in the seamless world of server-side Java development for several years and decided to brush up on my C++ chops (for reasons including, but not limited to, boredom, warfare, economy, and masochism). However, since sitting down to a very usable Emacs 21.1/Cygwin 1.0 development environment on a Win2K box, I seem to be missing runtime threading support in C++ (using the stock gcc/g++ compiler and libraries that come w/ Cygwin 1.0). Oddly enough, I can compile multi-threaded object code. However, I can't link into an executable. I've tried explicitly linking against the pthreads library, to no avail (here's a shot at no library specification, -lpthread, and -lpthreads -- for good measure): g++ -Wall Task.o QueueProcessor.o Driver.o -o Driver.exe QueueProcessor.o(.text+0x327):QueueProcessor: undefined reference to `pthread_create' g++ -Wall Task.o -lpthreads QueueProcessor.o Driver.o -o Driver.exe /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/bin/ld: cannot open -lpthreads: No such file or directory g++ -Wall Task.o -lpthread QueueProcessor.o Driver.o -o Driver.exe /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/bin/ld: cannot open -lpthread: No such file or directory After a bit of web searching, I'm picking up bits of a rumor of a lack of C++ threads runtime support from Cygwin. Is this true!?!?! If so, why would it ship w/ the header files to support object code compilation!?! And where can I find a POSIX threads library? Or any other usable threads library, for that matter? This is just the beginning of an attempt to re-trace all the patterns I consider fundamental to Java development... It'd be a shame to have it end here with something so basic. Am I just missing a simple compilate flag or environment variable? about to return to the JDE, Evan __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/