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: <20010508055632.52908.qmail@web14103.mail.yahoo.com> Date: Tue, 8 May 2001 07:56:32 +0200 (CEST) From: =?iso-8859-1?q?Altac=20Edena?= Subject: 1.3.1 : again a regex problem (even with -lregex) To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I've read many messages from the mailing list concerning the regex "bug", but the given solution (linking with libregex.a) doesn't work for me. It seems gcc just ignores the library. I only noticed that if I compile the regex source files and link all the regXXX.o with my own code, then it works. I m using Cygwin 1.3.1 including regex-4.4. My test code : #include #include #include void main() { regex_t preg; int errcode; if( (errcode = regcomp(&preg, "hello", 0)) ) printf("Error = %d\n", errcode); else { printf("Success\n"); regfree(&preg); } } If I compile with : gcc -o mytest -lregex mytest.c I get this output : Error = 167837880 If I compile with : gcc -c mytest.c gcc -o mytest mytest.o regcomp.o regfree.o I get this output : Success Any idea ? Maybe I missed something really stupid, but ... ___________________________________________________________ Do You Yahoo!? -- Pour faire vos courses sur le Net, Yahoo! Shopping : http://fr.shopping.yahoo.com -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple