我正在使用Eclipse 3.3.1.1和gcc将一个大型C ++项目从Windows移植到Solaris 9。它生成一个makefile,但它无法读取它:
gcc -f /export/home/MyPath/Debug/makefile -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /_support/develop_tools/Sol10_gcc/gcc-4.2.4/configure --prefix=/usr/local/gcc4.2.4 --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++
Thread model: posix
gcc version 4.2.4
/usr/local/gcc4.2.4/libexec/gcc/sparc-sun-solaris2.10/4.2.4/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy /usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4/crt1.o /usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4/crti.o /usr/ccs/lib/values-Xa.o /usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4/crtbegin.o -L/usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4 -L/usr/ccs/lib -L/usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4/../../.. /export/home/MyPath/Debug/makefile -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc /usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4/crtend.o /usr/local/gcc4.2.4/lib/gcc/sparc-sun-solaris2.10/4.2.4/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.9-1.393
ld: fatal: file /export/home/MyPath/Debug/makefile: unknown file type
ld: fatal: File processing errors. No output written to a.out
collect2: ld returned 1 exit status
谁能看到我做错了什么?我想也许版本不兼容,但我是新手。我将它设置为使用gcc编译器而不是Solaris,但它没有帮助。它能是什么?
答案 0 :(得分:2)
Makefile本身不应该使用gcc编译,而是包含如何调用gcc的说明。
答案 1 :(得分:1)
尝试“make -f / export / home / MyPath / Debug / makefile -v”