1

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.

Community
  • 1
  • 1
Gojira
  • 2,941
  • 2
  • 21
  • 30
  • x86 does not mean 32-bit per se. If you're using an Intel CPU, the ISA is x86. The 64-bit version is often stylized as x86-64. If the .exe shows AMD64, it sounds like it was compiled for an AMD processor, not an Intel one. – mstbaum Apr 21 '15 at 14:47
  • `or if that's a dead end and I should be using exclusively 64-bit` If you can't build a 32-bit program, you need to fix your compiler suite and/or settings. – PaulMcKenzie Apr 21 '15 at 14:48
  • @PaulMcKenzie, I've built a few dozen C++ programs with my current setup, it's just that trying to include in order to use std::find doesn't work. So it's not that my entire environment is broken, it's that there is something specific to that library that is causing a hitch. – Gojira Apr 21 '15 at 14:55
  • @GojiraDeMonstah Then as I stated, you need to fix your compiler suite, as it's broken. The `` header is a standard C++ header file. If you can't use it, then ask yourself "what other headers are also not found?" Today it's , tomorrow it may be , or , etc.. – PaulMcKenzie Apr 21 '15 at 14:58
  • @PaulMcKenzie , I get it, I just don't know (coming from a non C++ background but trying to get smarter) what compiler suite should work. I've switched tool chains from Cygwin GCC to MinGW GCC, that doesn't make a difference. Thus my question - how do I fix it? – Gojira Apr 21 '15 at 15:07

0 Answers0