我想要做的事情是(在 Windows 7 64 位系统上):
g++ -m64 -o main main.cpp
我收到的错误是:
Sorry, unimplemented: 64 bit mode not compiled in ...
我从这里安装了mingw-64-install.exe:https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/
但我仍然收到相同的错误。 我是否还需要将此文件夹的路径添加到环境变量中?
当我键入g++ -v
时,我得到的是:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=m
ingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i58
6 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-sha
red --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable- version-sp
ecific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls
Thread model: win32
gcc version 4.9.3 <GCC>
C:\Program Files\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw-w64.bat
了吗? - nwellnhofg++ -m64 main.cpp -o main.exe
http://pastebin.com/wjBtFv5c - lads