public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling Parmacs application
       [not found] <CANHnzdvf_ApdT8Gj3sXPW3iWx6FDNQJdF7qV6k2yp8gNXsBtWA@mail.gmail.com>
@ 2012-01-11 22:11 ` Hamid Reza Khaleghzadeh
  2012-01-11 22:30   ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Hamid Reza Khaleghzadeh @ 2012-01-11 22:11 UTC (permalink / raw)
  To: gcc-help

Hi

Could you tell me how parmacs application can be compiled?
Parmacs as PThread is a library for creating multi threaded applications.
 I 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 ‘parmacs_barrier’
/home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:36:1: error: unknown
type name ‘parmacs_global’
/home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:37:1: error: unknown
type name ‘parmacs_event’
/home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:38:1: error: unknown
type name ‘parmacs_lock’
/home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:69:1: error: unknown
type name ‘parmacs_pid’
/home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:71:1: error: unknown
type name ‘parmacs_timestamp’
par.c: In function ‘main’:
par.c:13:2: error: invalid use of void expression
par.c:14:2: error: invalid use of void expressio


Could you help me?

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compiling Parmacs application
  2012-01-11 22:11 ` Compiling Parmacs application Hamid Reza Khaleghzadeh
@ 2012-01-11 22:30   ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2012-01-11 22:30 UTC (permalink / raw)
  To: Hamid Reza Khaleghzadeh; +Cc: gcc-help

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.
>  I 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 ‘parmacs_barrier’
> /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:36:1: error: unknown
> type name ‘parmacs_global’
> /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:37:1: error: unknown
> type name ‘parmacs_event’
> /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:38:1: error: unknown
> type name ‘parmacs_lock’
> /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:69:1: error: unknown
> type name ‘parmacs_pid’
> /home/hamidreza/parmacs.upc.3/pthreads/parmacs.h:71:1: error: unknown
> type name ‘parmacs_timestamp’
> par.c: In function ‘main’:
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-11 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CANHnzdvf_ApdT8Gj3sXPW3iWx6FDNQJdF7qV6k2yp8gNXsBtWA@mail.gmail.com>
2012-01-11 22:11 ` Compiling Parmacs application Hamid Reza Khaleghzadeh
2012-01-11 22:30   ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).