From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18287 invoked by alias); 11 Jan 2012 13:08:05 -0000 Received: (qmail 18187 invoked by uid 22791); 11 Jan 2012 13:08:03 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-lpp01m010-f47.google.com (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jan 2012 13:07:50 +0000 Received: by lami14 with SMTP id i14so279869lam.20 for ; Wed, 11 Jan 2012 05:07:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.23.74 with SMTP id k10mr5383393lbf.35.1326287269280; Wed, 11 Jan 2012 05:07:49 -0800 (PST) Received: by 10.112.8.69 with HTTP; Wed, 11 Jan 2012 05:07:49 -0800 (PST) In-Reply-To: References: Date: Wed, 11 Jan 2012 22:30:00 -0000 Message-ID: Subject: Re: Compiling Parmacs application From: Jonathan Wakely To: Hamid Reza Khaleghzadeh Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg00076.txt.bz2 On 11 January 2012 12:52, Hamid Reza Khaleghzadeh wrote: > Hi > > Could you tell me how parmacs application can be compiled? > Parmacs as PThread is a library for creating multi threaded applications. > =A0I have written a parmacs application and when compile it with gcc, I > encounter with following error: > > /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:35:1: error: unknown > type name =91parmacs_barrier=92 > /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:36:1: error: unknown > type name =91parmacs_global=92 > /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:37:1: error: unknown > type name =91parmacs_event=92 > /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:38:1: error: unknown > type name =91parmacs_lock=92 > /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:69:1: error: unknown > type name =91parmacs_pid=92 > /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:71:1: error: unknown > type name =91parmacs_timestamp=92 > par.c: In function =91main=92: > par.c:13:2: error: invalid use of void expression > par.c:14:2: error: invalid use of void expressio > > > Could you help me? Your code has bugs, you need to fix those bugs. For example, you need to look on line 35 of parmacs.h and see how 'parmacs_barrier' is used, and why the compiler thinks it's an invalid type. Is it supposed to be a type? If yes, why isn't it known? If no, why does the compiler think you are using it as a type? It's not really possible to give more help, because you haven't shown how you called gcc or what the code looks like on the lines listed in the error messages.