c) ошибка make и проблема со связью: i386: архитектура x86-64 входного файла, несовместимая с выводом i386

У меня этот вывод с сообщением об ошибке, когда я набираю" make "в терминале !!

gcc test1.o dispatchQueue.o -o test1 -pthread
/usr/bin/ld: i386:x86-64 architecture of input file `test1.o' is incompatible with i386     output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [test1] Error 1

Есть ли кто-нибудь, кто может объяснить, почему и как это исправить? : (

Я прикрепляю make-файл на всякий случай

# Comment out the targets you don't want.

# Runs all of the tests.
all: test1 test2 test3 test4 test5 testFor
    ./test1
    ./test2
    ./test3
    ./test4
    ./test5
    ./testFor

test1: test1.o dispatchQueue.o
    gcc test1.o dispatchQueue.o -o test1 -pthread

test1.o: test1.c
    gcc -c test1.c

test2: test2.o dispatchQueue.o
    gcc test2.o dispatchQueue.o -o test2 -pthread

test2.o: test2.c
    gcc -c test2.c

test3: test3.o dispatchQueue.o
    gcc test3.o dispatchQueue.o -o test3 -pthread

test3.o: test3.c
    gcc -c test3.c

test4: test4.o dispatchQueue.o
    gcc test4.o dispatchQueue.o -o test4 -pthread

test4.o: test4.c
    gcc -c test4.c

test5: test5.o dispatchQueue.o
    gcc test5.o dispatchQueue.o -o test5 -pthread

test5.o: test5.c
    gcc -c test5.c

testFor: testFor.o dispatchQueue.o
    gcc testFor.o dispatchQueue.o -o testFor -pthread

testFor.o: testFor.c
    gcc -c testFor.c

dispatchQueue.o: dispatchQueue.c dispatchQueue.h
    gcc -c dispatchQueue.c
23
задан user890040 11 August 2011 в 13:48
поделиться