LinuxQuestions.org
Visit Jeremy's Blog.
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 05-23-2013, 06:58 PM   #1
Phuizar
LQ Newbie
 
Registered: May 2013
Posts: 2

Rep: Reputation: Disabled
Unistd.h error when running Makefile


I am trying to create a version of code in a bigger project that is by itself. I know the code runs in the bigger project and believe my problem is in the makefile. The makefile is trying to create RegEx.o from RegEx.h which includes GSUtils, which includes unistd.h. From here the makefile says that unistd.h is having a problem.



Here is the error I receive.
Code:
In file included from GSCUtils/GSCUtils.h:55,
                 from GSCUtils/RegEx.c:64:
/usr/include/unistd.h:224: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'

Here is what I believe is the code that is breaking
Code:
CFLAGS := -Wall -Wno-missing-field-initializers -Wno-missing-braces -Wno-unknown-pragmas -g -O2 -std=gnu99 -DPOPSYS_LINUX

...

INCLUDES = -IGSCUtils 

...

CFLAGS += ${INCLUDES}

...

GSCUtilsPROJECT = libGSCUtils.a
GSCUtilsSRCS = GSCUtils/RegEx.c
GSCUtilsOBJECTS = ${GSCUtilsSRCS:.c=.o}

...

all: ${PROJECTS}

clean:
	rm -f ${PROJECTS} ${ALLOBJECTS}

...

${GSCUtilsPROJECT}: ${GSCUtilsOBJECTS}
	rm -f ${GSCUtilsPROJECT}
	ar -cq ${GSCUtilsPROJECT} ${GSCUtilsOBJECTS}
	ranlib ${GSCUtilsPROJECT}
 
Old 05-27-2013, 11:35 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
What's on line 224 of your /usr/include/unistd.h?

Does it fail if you remove the -gnu99?
 
  


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
[SOLVED] Unistd.h error when running Makefile Phuizar Programming 1 05-25-2013 04:53 AM
termios.h and unistd.h no such file error johonn Linux - Newbie 2 03-29-2013 09:04 PM
Error running Makefile. Please try it by hand. g.tauanearu Linux - Networking 1 05-19-2012 10:26 AM
error running my makefile yogeshk@redim.net Linux - Software 1 01-06-2007 01:34 AM

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

All times are GMT -5. The time now is 11:58 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