Georg Ströhlein <derstroehleinschor...@gmail.com> writes: > 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
Do you need to use the full path for executing g++? This makes me think that z:/MSYS2/mingw64/bin is not in the PATH. Make sure that you execute bash using the correct shortcut. Alternatively, in bash do this: export PATH=/z/msys2/mingw64/bin:$PATH g++ -o Helloworld Helloworld.cpp ./HelloWorld If the above works, your problem is with PATH environment variable. g++ produces executables that depend on some DLLs, if those DLLs are not on a directory listed on PATH or in the same executable where the executable is, the execution will fail. Also, if other dll with the same name is in some directory listed on PATH, the program may crash. BTW, it is not x64, it's either x86 (32 bits) or x86_64 (64 bits). Also, do not confuse MSYS2 executables with Mingw executables. The former depend on a POSIX emulation system (provided by msys-2.0.dll). ------------------------------------------------------------------------------ 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