Linking problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I was compiling sample program given in tutorials.
I create a new folder for the same program.
there are 3 files in my folder
1. main.c
2.main_rtems.c
3.pjsua_app.c

and one makefile whose contents are:-

PJBASE=/home/pranoti/pjproject

include $(PJBASE)/build.mak

CC = $(APP_CC)
LDFLAGS = $(APP_LDFLAGS)
LDLIBS = $(APP_LDLIBS)
CFLAGS = $(APP_CFLAGS)
CPPFLAGS = ${CFLAGS}

all: main

main: main.c
    $(CC)-O$@$<$(CPPFLAGS)$(LDFLAGS)$(LDLIBS)

clean:
    rm -f main.o main




I got errors for makefile as:-

makefile:8: *** Recursive variable `CFLAGS' references itself (eventually).
Stop.

and for programs,;-
/usr/lib/gcc/i686-redhat-linux/4.4.3/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status


can anyone tell me why error in makefile?
and the error in program regarding to it or not?

Please help me.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100401/40c1bc02/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux