简体   繁体   English

即使我解压缩了4.8.1,GCC -v仍会返回GCC 4.7.3?

[英]GCC -v returns GCC 4.7.3 even though I unpacked 4.8.1?

so I went to this link Source Forge MinGW to download and install MinGW 4.8.1. 因此,我转到了Source Forge MinGW链接下载并安装MinGW 4.8.1。 (rev 5). (修订版5)。 I unpack it into C:\\MinGW\\mingw32. 我将其解压缩到C:\\ MinGW \\ mingw32。 So I open command prompt (win 32 system) and run gcc -v and I get GCC is 4.7.3. 所以我打开命令提示符(win 32系统)并运行gcc -v,我得到的GCC是4.7.3。 This is the full output of gcc -v: 这是gcc -v的完整输出:

C:\MinGW\mingw32>gcc -v Using built-in specs. COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin Configured with:
/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3
/configure
--srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.
7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --lib execdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --d atarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --ho st=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix
--without-li bintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-ver sion-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwar f2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-langu ages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads= posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmat h-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-subli bs --disable-java-awt --disable-symvers
--with-ecj-jar=/usr/share/java/ecj.jar -
-with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-sy stem-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src
/gcc-4.7.3/configure
--srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/ src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/ sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdi r=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-c ygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix -- without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static -- enable-version-specific-runtime-libs --enable-bootstrap
--disable-__cxa_atexit -
-with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --en able-languages=ada,c,c++,fortran,java,lto,objc,obj-c++
--enable-graphite --enabl e-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable- libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-li bgcj-sublibs --disable-java-awt --disable-symvers
--with-ecj-jar=/usr/share/java /ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl  --with-system-zlib Thread model: posix gcc version 4.7.3 (GCC)

C:\MinGW\mingw32>

I would like to know why it unpacked an earlier version and how to fix this. 我想知道为什么它解压缩了较早的版本以及如何解决此问题。 Apparently C::B see's it as an earlier build too! 显然,C :: B也是早期版本! It really baffles me Oo Also, the prompt returns that threads use Posix when it should be Win32, again really rattling my brain here. 真的,这让我感到困惑。此外,提示还返回线程应该在Win32上使用Posix的提示,这再次使我的大脑不知所措。

If any one can point to some links, or clear any of this up it would be greatly appreciated! 如果有人可以指向某些链接,或者清除其中的任何链接,将不胜感激!

What you unpacked, and what the OS presents when you call the program, need not be the same thing. 打包后的内容以及调用程序时OS呈现的内容不必是同一回事。 Did you do a rehash? 你进行过重新哈希处理吗? Confirm that the path is the same? 确认路径相同? Or is the new version at a later point in the path? 还是在以后的版本中使用新版本? You might want to alias the gcc command to the version you want. 您可能想将gcc命令别名为所需的版本。 Type which gcc to see where the OS thinks the "current version" is located - that should help. 键入哪个gcc以查看操作系统认为“当前版本”的位置-应该会有所帮助。 EDIT I realize the which command may not work in windows (just noticed the C: drive letter) but the main point about paths is still valid. 编辑我意识到,哪个命令可能在Windows中不起作用(只是注意到了C:驱动器号),但是关于路径的要点仍然有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM