Re: ld: 0711-317 ERROR: Undefined symbol: .main gcc error

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

 



Hi Jayashree,

You are posting in an incorrect forum.  This is the GCC help forum, not the
GNU Make help forum.

I do not mention this to chastise, I mention it because it is likely that
you will get better, faster, more accurate answers on a GNU Make help forum
then here.

That being said...

This line is malformed:

OBJ_MAIN_EOD = $( SRC_MAIN_EOD:.c=.o)

You have a space after the open paren.

Also, just as a matter of style, I recommend you using this for your eod
target:

eod: $(OBJ_MAIN_EOD)
  $(CC) $(CFLAGS) -o $@ $^ $(INCLUDE) -L. -L$(ORACLE_HOME)/lib32/ $(LIBPATH)

See 'automatic variables' in http://www.gnu.org/software/make/manual/

Also, my personal preference is to have all builds explicit (either ordinary
targets, or pattern rule targets), instead of relying on the implicit %.o :
%.c pattern rule.  But that's just me, and I only mention it for your
consideration.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux