LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2010, 03:17 PM   #1
borntofish61
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 0
syntax error before "pid_t"


I'm trying to compile some code off sourceforge, and get
In file included from rote.c:22:
rote.h:121: error: syntax error before "pid_t"
rote.h:121: warning: no semicolon at end of struct or union

It is dying on
pid_t childpid; /* pid of the child process running in the
from what I can tell. I think this should be defined in
#include <unistd.h>
since is the only include, and from what I found on the web.
Any ideas on the problem?
Thanks.
 
Old 04-02-2010, 03:22 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by borntofish61 View Post
rote.h:121: error: syntax error before "pid_t"
rote.h:121: warning: no semicolon at end of struct or union
I would guess that the word before in that message really does mean before.

I would also guess that the next message is also correct. If so, it is pretty clear.

Do you have a URL of the version of rote.h at SourceForge you are using?

Failing that, we might need to see a pretty big chunk of lines before line 121 (maybe all of them) in order to understand the problem.

Last edited by johnsfine; 04-02-2010 at 03:27 PM.
 
Old 04-02-2010, 03:31 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by borntofish61 View Post
I don't have the code in front of me now, but the line above was innoculus. I added some space lines above the pid_t line and the line number of the error moved with it.
The line number is of the reported token pid_t which is probably the token after the problem.

There is no reason for the line number to fail to move when you add blank lines. pid_t is still the token after the problem no matter how many blank lines there are between the problem and pid_t.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error: syntax error before "pid_t" - in unistd.h? borntofish61 Linux - Newbie 3 04-02-2010 04:32 PM
Backup Script error "line 31: syntax error: unexpected end of file" eswanepoel General 7 12-07-2007 09:28 AM
FC6 firefox hangs with "expr: syntax error" srn1 Fedora 0 08-16-2007 09:45 PM
Solution: Gentoo - emerge --sync fails with "syntax error" daniel.santos Linux - Software 3 03-13-2007 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration