5
不編譯模式,這就是我想要做的(在Windows 7 64位):對不起,沒有實現: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>
首先我選擇了x86_64,但它沒有工作。然後我重新安裝i686(不刪除以前的x86_64安裝),但它不起作用 – lads
而且我也忘了指定我以前也安裝了32位版本。我還沒有刪除。 – lads
@lads你是什麼意思的「它沒有工作」? g ++ -v的輸出是什麼? – nwellnhof