c )make error& link problem: i386:x86-64 architecture of input file, incompatible with i386 output c )make error& link problem: i386:x86-64 architecture of input file, incompatible with i386 output c c

c )make error& link problem: i386:x86-64 architecture of input file, incompatible with i386 output


You probably have some old files (at least test1.o) compiled for i386-x64. You can remove these old files and run make again. If you can modify the Makefile try adding a line such as:

clean:    rm *.o test1 test2 test3 test4 test5 testFor

Then when you run make clean it'll remove the old stuff, at which point you can run make again.


I had similar problem. Problem for me was that object files were generated with i386 arichitecture and I was trying to link with x86_64 linker. I deleted object files generated them anew with x86_64 options and tried to linking again. It works now


If the makefile is generated for the system, you should run ./configure to get new ones, and then recompile.