[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"generating prerequisite automatically" triggered error
From: |
Michael Chen |
Subject: |
"generating prerequisite automatically" triggered error |
Date: |
Wed, 30 May 2012 11:59:32 -0400 |
Dear there,
My make file was working with the
CFLAGS=-std=c99 -O3 -m32 -D_REENTRANT
After following the chapter 4.13 Generating Prerequisite Automatically
in the book GNU Make, I got the following error:
ld: warning: in csv.o, file was built for i386 which is not the
architecture being linked (x86_64)
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
The change suggested by the chapter 4.13 is:
%.d: %.c
@set -e; rm -f $@; \
$(CC) -MM $(CPPFLAGS) $< > address@hidden; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < address@hidden > $@; \
rm -f address@hidden
include $(sources:.c=.d)
Also the "make" complains cannot find .d files, but .d files are
generated anyway. hence there is no complaining in the second cal of
make.
Any ideas of the error and complaining?
--
All the best,
Michael Chen
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- "generating prerequisite automatically" triggered error,
Michael Chen <=