apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yogesh Test <ychaturv...@gmail.com>
Subject Error in including apr library in c code
Date Tue, 15 Jul 2008 11:59:43 GMT

Hi,

I have created a very basic program in c using apache portable run time
library version -1.2.12 , when i try to compile the program i am getting
problem as :

/usr/local/apr-1.2.12/include/apr.h:273: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘apr_off_t’

My make file is :
CC=gcc

CFLAGS=-c -Wall

LDFLAGS:= 

LDLIBS:=

SOURCES:=

BINDIR= ./bin

DATADIR=./data

CONFDIR=$(DATADIR)/conf

EXECUTABLE=Validate

DAEMON = 1

SOURCESDIR = ./trialc

SOURCES = $(shell ls $(SOURCESDIR)/*.c)

OBJECTS= $(SOURCES:.c=.o)

LDFLAGS	+= `/usr/local/apr-1.2.12/apr-1-config --cppflags --libs`

LDLIBS	+= /usr/local/apr-1.2.12/.libs/libapr-1.a







all: $(EXECUTABLE) 



$(EXECUTABLE): $(OBJECTS)  

	$(CC) $(SOURCES) $(LDFLAGS) $(LDLIBS) -o $(BINDIR)/$@



.cpp.o:

	$(CC) $(CFLAGS) $< -o $@

One thing more i want to add when i change statement in make file and use 
$(EXECUTABLE):   
instead of 
$(EXECUTABLE): $(OBJECTS) 

Then it compile successfully.

please help where i am wrong

Yogesh



-- 
View this message in context: http://www.nabble.com/Error-in-including-apr-library-in-c-code-tp18463094p18463094.html
Sent from the APR Dev (Apache Portable Runtime) mailing list archive at Nabble.com.


Mime
View raw message