I'm using Eclipse with Cygwin to work through some simple C++ exercises. When I try to include algorithm, I get a compile error:
E:\cygwin64\lib\gcc\x86_64-pc-cygwin\4.8.2\include\c++/cstdlib:178:10:
error: expected unqualified-id before '__int128'
Some light googling points me to a 32/64 bit mismatch error (e.g., this and this).
I have both 32- and 64-bit versions of Cygwin, so I changed my CYGWIN_HOME environment variable to E:\Cygwin64. Then it compiles!
But in trying to start the compiled executable, I get the error "The application was unable to start correctly (0xc000007b). Click OK to close the application."
Some more googling indicates that I'm improperly mixing x86 and x64 modules. Sure enough Dependency Walker says:
Error: Modules with different CPU types were found.
All the DLL dependencies show CPU types of x86, where the .exe itself shows AMD64.
I'm not sure what the next step should be. I don't know if algorithm is missing from the 32 bit version of Cygwin/GCC, or if that's a dead end and I should be using exclusively 64-bit, or some other option.