X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <26683356.post@talk.nabble.com> Date: Mon, 7 Dec 2009 12:12:22 -0800 (PST) From: Afflictedd2 To: cygwin AT cygwin DOT com Subject: Help with errors while compiling MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Hi everyone, I'm trying to build a simple program using pthreads, but I get the following errors, why? Any help appreciated. J make -f Makefile CFG=Debug g++ -c -g -o "Debug/Pthreads.o" -I/Cygwin/usr/include Pthreads.cpp In file included from Pthreads.cpp:10: /Cygwin/usr/include/pthread.h:77: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:77: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:78: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:78: error: ISO C++ forbids declaration of `pthread_attr_t' with no type /Cygwin/usr/include/pthread.h:79: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:79: error: ISO C++ forbids declaration of `pthread_attr_t' with no type /Cygwin/usr/include/pthread.h:80: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:80: error: ISO C++ forbids declaration of `pthread_attr_t' with no type /Cygwin/usr/include/pthread.h:81: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:81: error: ISO C++ forbids declaration of `pthread_attr_t' with no type /Cygwin/usr/include/pthread.h:82: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:82: error: ISO C++ forbids declaration of `pthread_attr_t' with no type /Cygwin/usr/include/pthread.h:83: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:83: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:84: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:84: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:84: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:84: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:85: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:85: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:85: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:85: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:86: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:86: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:86: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:86: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:87: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:87: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:87: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:87: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:88: error: `pthread_attr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:88: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:88: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:88: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:104: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:127: error: `pthread_cond_t' was not declared in this scope /Cygwin/usr/include/pthread.h:127: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:128: error: `pthread_cond_t' was not declared in this scope /Cygwin/usr/include/pthread.h:128: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:129: error: `pthread_cond_t' was not declared in this scope /Cygwin/usr/include/pthread.h:129: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:129: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:129: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:130: error: `pthread_cond_t' was not declared in this scope /Cygwin/usr/include/pthread.h:130: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:131: error: `pthread_cond_t' was not declared in this scope /Cygwin/usr/include/pthread.h:131: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:132: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:132: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:132: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:132: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:133: error: `pthread_cond_t' was not declared in this scope /Cygwin/usr/include/pthread.h:133: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:133: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:133: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:133: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:134: error: `pthread_condattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:134: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:135: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:135: error: ISO C++ forbids declaration of `pthread_condattr_t' with no type /Cygwin/usr/include/pthread.h:136: error: `pthread_condattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:136: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:137: error: `pthread_condattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:137: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:137: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:137: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:139: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:139: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:139: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:140: error: expected primary-expression before "void" /Cygwin/usr/include/pthread.h:140: error: expected primary-expression before "void" /Cygwin/usr/include/pthread.h:140: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:141: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:142: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:142: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:142: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:144: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:144: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:144: error: expected primary-expression before "struct" /Cygwin/usr/include/pthread.h:144: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:145: error: `pthread_key_t' was not declared in this scope /Cygwin/usr/include/pthread.h:146: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:146: error: expected primary-expression before "void" /Cygwin/usr/include/pthread.h:146: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:147: error: `pthread_key_t' was not declared in this scope /Cygwin/usr/include/pthread.h:147: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:147: error: expected primary-expression before "void" /Cygwin/usr/include/pthread.h:147: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:148: error: `pthread_key_t' was not declared in this scope /Cygwin/usr/include/pthread.h:151: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:151: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:152: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:152: error: ISO C++ forbids declaration of `pthread_mutex_t' with no type /Cygwin/usr/include/pthread.h:153: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:153: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:153: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:153: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:154: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:154: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:155: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:155: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:155: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:155: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:155: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:156: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:156: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:157: error: `pthread_mutex_t' was not declared in this scope /Cygwin/usr/include/pthread.h:157: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:158: error: `pthread_mutexattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:158: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:159: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:159: error: ISO C++ forbids declaration of `pthread_mutexattr_t' with no type /Cygwin/usr/include/pthread.h:160: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:160: error: ISO C++ forbids declaration of `pthread_mutexattr_t' with no type /Cygwin/usr/include/pthread.h:161: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:161: error: ISO C++ forbids declaration of `pthread_mutexattr_t' with no type /Cygwin/usr/include/pthread.h:162: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:162: error: ISO C++ forbids declaration of `pthread_mutexattr_t' with no type /Cygwin/usr/include/pthread.h:163: error: `pthread_mutexattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:163: error: expected primary-expression before ')' token /Cygwin/usr/include/pthread.h:164: error: `pthread_mutexattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:164: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:164: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:164: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:165: error: `pthread_mutexattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:165: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:165: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:165: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:166: error: `pthread_mutexattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:166: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:166: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:166: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:167: error: `pthread_mutexattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:167: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:167: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:167: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:170: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:170: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:171: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:171: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:171: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:171: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:172: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:172: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:173: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:173: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:174: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:174: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:175: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:175: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:176: error: `pthread_rwlock_t' was not declared in this scope /Cygwin/usr/include/pthread.h:176: error: `rwlock' was not declared in this scope /Cygwin/usr/include/pthread.h:177: error: `pthread_rwlockattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:177: error: `rwlockattr' was not declared in this scope /Cygwin/usr/include/pthread.h:178: error: expected `,' or `...' before '*' token /Cygwin/usr/include/pthread.h:179: error: ISO C++ forbids declaration of `pthread_rwlockattr_t' with no type /Cygwin/usr/include/pthread.h:180: error: `pthread_rwlockattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:180: error: `attr' was not declared in this scope /Cygwin/usr/include/pthread.h:180: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:180: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:181: error: `pthread_rwlockattr_t' was not declared in this scope /Cygwin/usr/include/pthread.h:181: error: `rwlockattr' was not declared in this scope /Cygwin/usr/include/pthread.h:183: error: `pthread_once_t' was not declared in this scope /Cygwin/usr/include/pthread.h:183: error: expected primary-expression before ',' token /Cygwin/usr/include/pthread.h:183: error: expected primary-expression before "void" /Cygwin/usr/include/pthread.h:183: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:190: error: `pthread_t' does not name a type /Cygwin/usr/include/pthread.h:193: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:193: error: expected primary-expression before "int" /Cygwin/usr/include/pthread.h:193: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:193: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:194: error: `pthread_key_t' was not declared in this scope /Cygwin/usr/include/pthread.h:194: error: expected primary-expression before "const" /Cygwin/usr/include/pthread.h:194: error: initializer expression list treated as compound expression /Cygwin/usr/include/pthread.h:199: error: `pthread_t' was not declared in this scope /Cygwin/usr/include/pthread.h:200: error: `pthread_t' was not declared in this scope Pthreads.cpp: In function `int main(int, char**)': Pthreads.cpp:26: error: `pthread_t' undeclared (first use this function) Pthreads.cpp:26: error: (Each undeclared identifier is reported only once for each function it appears in.) Pthreads.cpp:26: error: expected `;' before "threads" Pthreads.cpp:32: error: `threads' undeclared (first use this function) Pthreads.cpp:32: error: `pthread_create' cannot be used as a function mingw32-make: *** [Debug/Pthreads.o] Error 1 -- View this message in context: http://old.nabble.com/Help-with-errors-while-compiling-tp26683356p26683356.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple