現在我想從源代碼編譯MinGW谷歌的協議緩衝區,但是當我嘗試:配置過程出現「C編譯器不能創建可執行文件」
[email protected] /e/workspace/protobuf-2.5.0
$ ./configure
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/e/workspace/protobuf-2.5.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
和配置說:This
似乎未能解決此
configure:3474: checking whether the C compiler works
configure:3496: gcc conftest.c >&5
gcc.exe: error: CreateProcess: No such file or directory
configure:3500: $? = 1
configure:3538: result: no
繼承人-v的輸出:
$ gcc -v helloworld.c
Using built-in specs.
COLLECT_GCC=E:\MinGW\bin\gcc.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
--enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
cc1 -quiet -v -iprefix E:\MinGWmingw32/4.8.1/ helloworld.c -quiet -dumpbase hel
loworld.c -mtune=generic -march=pentiumpro -auxbase helloworld -version -o C:\Us
ers\Matthew\AppData\Local\Temp\ccVVxhTh.s
gcc.exe: error: CreateProcess: No such file or directory
任何人都遇到過這個問題或者可以幫忙嗎?
如果你在提示符下鍵入'gcc conftest.c',你會得到相同的錯誤還是其他的東西? 'gcc -v conftest.c'的輸出可能也會有幫助 - 特別是如果你得到'CreateProcess'錯誤。 –
conftest.c doesnt even exists .. E:\ workspace> forfiles/s/m * .c/C「cmd/c echo @path」 錯誤:未找到「* .c」類型的文件。 –
我想配置腳本在完成後擦除'conftest.c' - 'conftest.c'只是一個程序,它只有一個'main()',只有一個'return 0;'(你可以看到內容'config.log'文件中的'conftest.c')。你可以使用任何你可能躺在周圍的「你好世界」程序。我想我只是驗證MinGW是否安裝正確。 –