0
我正嘗試使用MSYS從最新的SDL 2.0 Mercurial存儲庫創建MinGW SDL庫。 (由於此張貼。)我在下面this tutorial,當我需要使用MSYS配置我進入MSYS SDL-2.0「C編譯器無法創建可執行文件」
$ ./configure --prefix=/mingw --enable-stdio-redirect=no
到MSYS。它濺射出以下幾點:
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
我使用gcc版本2.95(據 「GCC -v」),最新的MSYS/MSYS-DTK,以及最新的SDL 2.0 Mercurial sources。有誰知道爲什麼MSYS可能會給我這個錯誤,或者有人從當前的SDL 2.0源成功地創建了MinGW二進制文件?
編輯:這是一個被./config中生成的config.log文件:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --prefix=/mingw --enable-stdio-redirect=no
## --------- ##
## Platform. ##
## --------- ##
hostname = NFLODUDE
uname -m = i686
uname -r = 1.0.10(0.46/3/2)
uname -s = MINGW32_NT-6.1
uname -v = 2004-03-15 07:17
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Python25/
PATH: /c/Program Files/Common Files/Microsoft Shared/Windows Live
PATH: /c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live
PATH: /c/Program Files (x86)/Microsoft DirectX SDK (August 2007)/Utilities/Bin/x86
PATH: /c/Perl/site/bin
PATH: /c/Perl/bin
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /c/Program Files/Dell/Dell Wireless WLAN Card
PATH: /c/Program Files (x86)/OpenLibraries/bin
PATH: /c/Program Files/Trend Micro/AMSP
PATH: /c/Program Files (x86)/MySQL/MySQL Server 5.5/bin
PATH: /c/Program Files (x86)/Java/jdk1.6.0_23/bin
PATH: /c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0/
PATH: /c/Program Files/MySQL/MySQL Server 5.5/bin
PATH: /c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/
PATH: /c/Program Files/Microsoft SQL Server/100/Tools/Binn/
PATH: /c/Program Files/Microsoft SQL Server/100/DTS/Binn/
PATH: /c/Program Files (x86)/Java/jdk1.6.0_23/bin
PATH: /c/perl_op/bin
PATH: /c/Program Files (x86)/gtk2/bin
PATH: /c/Program Files (x86)/mlt/bin
PATH: /c/Program Files (x86)/OpenLibraries/bin
PATH: /c/Windows/SysWOW64
PATH: /c/Program Files (x86)/Windows Live/Shared
PATH: /c/Program Files (x86)/GtkSharp/2.12/bin
PATH: .
PATH: /c/Program Files (x86)/QuickTime/QTSystem/
PATH: /c/Program Files (x86)/Google/google_appengine
PATH: /c/Free Pascal Compiler/2.4.4/bin/i386-Win32
PATH: /c/Program Files (x86)/Heroku
PATH: /c/Program Files (x86)/git/bin
PATH: /c/Program Files (x86)/git/cmd
PATH: /c/PHP/
PATH: /c/PHP/ext
PATH: /c/Program Files (x86)/CMake 2.8/bin
PATH: /c/Users/Owner/Documents/Code Projects/Java Projects/LWJGL/lwjgl-2.8.3/native/windows
PATH: /c/Program Files/TortoiseGit/bin
PATH: /c/Program Files/TortoiseHg/
PATH: /c/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Bin
PATH: /c/Ruby193/bin
PATH: /c/Program Files (x86)/Java/jdk1.6.0_23/bin
PATH: /c/Program Files (x86)/g95/bin
PATH: /c/MinGW/bin
PATH: /c/Program Files (x86)/Nmap
PATH: /c/GNUstep/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2098: WARNING: Libtool does not cope well with whitespace in `pwd`
configure:2127: checking build system type
configure:2145: result: i686-pc-mingw32
configure:2167: checking host system type
configure:2182: result: i686-pc-mingw32
configure:2252: checking for gcc
configure:2268: found /c/Free Pascal Compiler/2.4.4/bin/i386-Win32/gcc
configure:2279: result: gcc
configure:2517: checking for C compiler version
configure:2524: gcc --version >&5
2.95
configure:2527: $? = 0
configure:2534: gcc -v >&5
Using builtin specs.
gcc version 2.95 19990728 (release)
configure:2537: $? = 0
configure:2544: gcc -V >&5
gcc.exe: argument to `-V' is missing
configure:2547: $? = 1
configure:2570: checking for C compiler default output file name
configure:2597: gcc conftest.c >&5
Usage: cpp [switches] input output
Switches:
-include <file> Include the contents of <file> before other files
-imacros <file> Accept definition of marcos in <file>
-iprefix <path> Specify <path> as a prefix for next two options
-iwithprefix <dir> Add <dir> to the end of the system include paths
-iwithprefixbefore <dir> Add <dir> to the end of the main include paths
-isystem <dir> Add <dir> to the start of the system include paths
-idirafter <dir> Add <dir> to the end of the system include paths
-I <dir> Add <dir> to the end of the main include paths
-nostdinc Do not search the system include directories
-nostdinc++ Do not search the system include directories for C++
-o <file> Put output into <file>
-pedantic Issue all warnings demanded by strict ANSI C
-traditional Follow K&R pre-processor behaviour
-trigraphs Support ANSI C trigraphs
-lang-c Assume that the input sources are in C
-lang-c89 Assume that the input is C89; deprecated
-lang-c++ Assume that the input sources are in C++
-lang-objc Assume that the input sources are in ObjectiveC
-lang-objc++ Assume that the input sources are in ObjectiveC++
-lang-asm Assume that the input sources are in assembler
-lang-chill Assume that the input sources are in Chill
-std=<std name> Specify the conformance standard; one of:
gnu89, gnu9x, c89, c9x, iso9899:1990,
iso9899:199409, iso9899:199x
-+ Allow parsing of C++ style features
-w Inhibit warning messages
-Wtrigraphs Warn if trigraphs are encountered
-Wno-trigraphs Do not warn about trigraphs
-Wcomment{s} Warn if one comment starts inside another
-Wno-comment{s} Do not warn about comments
-Wtraditional Warn if a macro argument is/would be turned into
a string if -traditional is specified
-Wno-traditional Do not warn about stringification
-Wundef Warn if an undefined macro is used by #if
-Wno-undef Do not warn about testing undefined macros
-Wimport Warn about the use of the #import directive
-Wno-import Do not warn about the use of #import
-Werror Treat all warnings as errors
-Wno-error Do not treat warnings as errors
-Wall Enable all preprocessor warnings
-M Generate make dependencies
-MM As -M, but ignore system header files
-MD As -M, but put output in a .d file
-MMD As -MD, but ignore system header files
-MG Treat missing header file as generated files
-g Include #define and #undef directives in the output
-D<macro> Define a <macro> with string '1' as its value
-D<macro>=<val> Define a <macro> with <val> as its value
-A<question> (<answer>) Assert the <answer> to <question>
-U<macro> Undefine <macro>
-u or -undef Do not predefine any macros
-v Display the version number
-H Print the name of header files as they are used
-C Do not discard comments
-dM Display a list of macro definitions active at end
-dD Preserve macro definitions in output
-dN As -dD except that only the names are preserved
-dI Include #include directives in the output
-ifoutput Describe skipped code blocks in output
-P Do not generate #line directives
-$ Do not include '$' in identifiers
-remap Remap file names when including files.
-h or --help Display this information
cpp: Too many arguments
configure:2600: $? = 1
configure:2638: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
|
| int
| main()
| {
|
| ;
| return 0;
| }
configure:2645: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-mingw32
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-mingw32
ac_cv_prog_ac_ct_CC=gcc
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOCA=''
ALSA_CFLAGS=''
ALSA_LIBS=''
AR=''
ARTSCONFIG=''
AS=''
BUILD_CFLAGS=''
BUILD_LDFLAGS=''
CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXFLAGS=''
DEFS=''
DIRECTFBCONFIG=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_SHARED_FALSE=''
ENABLE_SHARED_TRUE=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
ESD_CFLAGS=''
ESD_CONFIG=''
ESD_LIBS=''
EXEEXT=''
EXTRA_CFLAGS=''
EXTRA_LDFLAGS=''
FGREP=''
GREP=''
INCLUDE=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_AGE=''
LT_CURRENT=''
LT_RELEASE=''
LT_REVISION=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJECTS=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PKG_CONFIG=''
POW_LIB=''
RANLIB=''
SDLMAIN_OBJECTS=''
SDL_BINARY_AGE='0'
SDL_CFLAGS=''
SDL_INTERFACE_AGE='0'
SDL_LIBS=''
SDL_MAJOR_VERSION='2'
SDL_MICRO_VERSION='0'
SDL_MINOR_VERSION='0'
SDL_RLD_FLAGS=''
SDL_STATIC_LIBS=''
SDL_VERSION='2.0.0'
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION_OBJECTS=''
WINDRES=''
XMKMF=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_aux_dir='build-scripts'
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
bindir='${exec_prefix}/bin'
build='i686-pc-mingw32'
build_alias=''
build_cpu='i686'
build_os='mingw32'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-mingw32'
host_alias=''
host_cpu='i686'
host_os='mingw32'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/mingw'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define _GNU_SOURCE 1
configure: exit 77
我真的不知道做的config.log什麼的,但...
你可以升級嗎? 'gcc version 2.95'於1999年發佈,所以它已經很老了(可能與你的問題沒有關係)。 – 2012-07-06 05:38:18
你看過在錯誤結尾提到的'config.log'文件嗎?你能在這裏發佈內容嗎?您應該嘗試刪除目錄名稱中的所有空格,如第一個警告所示。 – krtek 2012-07-06 11:06:30
剛剛添加config.log,但我仍然沒有看到任何明顯的奇怪錯誤... – neilf 2012-07-06 15:15:43