On Tue, 31 Oct 2017, at 20:13, Georg Ströhlein  wrote:

> I have successfully (??) set up MSYS2 x64 together with gcc x64 and 
> geany x64 on a Win7x64 PC. 
> 
> The exe files created from the source HelloWorld.cpp:
> 
> #include <iostream>
> using namespace std;
> 
> int main()
> 
> {
> cout << "Hello World.\n";
> return 0;
> 
> }
> 
> by either geany or entering
> 
> z://MSYS2/mingw64/bin/g++ -o Helloworld Helloworld.cpp
> 
> in the x64 bash run well only from the command line of the MINGW_x64 
> bash. 

I installed MSYS2 on a W8.1 64-bit system a couple of weeks ago, and
then
both the 32 and 64-bit MinGW-w64 toolchains.  I know nearly nothing
about
all this... but my test compiles worked.

However I ran them from a Windows command prompt, not the MSYS2 or 
MinGW-w64 shells.

I started by temporarily changing the Windows PATH, by

C:\>PATH %PATH%;E:\Msys2-64\mingw64\bin

then explicitly executed the specific g++ I wanted:

"C:\>E:\Msys2-64\mingw64\bin\x86_64-w64-mingw32-g++.exe" ...


My HelloWorld.cpp is almost identical to your one.  The .exe that the
compiler produced is 385 KB in size.


-- 
Jeremy Nicoll - my opinions are my own.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to