I am really new to C++ and I don't know much about computer architecture so I am sorry if this questions is stupid, but I didn't find a clear answer online. I need to run a code "built as a 64bit executable". I am not sure what that means, but from what I found online, I need to add -m64 (I use CodeBlocks, so I just checked the box for that compiler flag). However I am getting this error "cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in". I am not sure what I should do (I am not even sure if adding that flag is the right thing to do). Also I am not sure what a "64bit executable" exactly means. I am running this on a 64-bit Windows 10. (I am able to compile and run other programs without the -m64 flag, but adding that flag gives me that error for these previously working programs, too). Any advice would be really appreciated. Thank you
Asked
Active
Viewed 90 times
0
-
1It would help if you mentioned what compiler and version you're using. – Mark Ransom Dec 19 '20 at 02:56
-
@MarkRansom Sorry, I know so little about this, that I was not even sure what info to provide. I ran gcc --version and this is what I got: gcc (MinGW.org GCC Build-2) 9.2.0 – JohnDoe122 Dec 19 '20 at 03:08
-
Does the error message not tell you the answer? Your compiler was built without support for 64-bit mode, so you need a different compiler. – JaMiT Dec 19 '20 at 03:18
-
Does this answer your question? [Cgo: sorry, unimplemented: 64-bit mode not compiled in](https://stackoverflow.com/questions/39863157/cgo-sorry-unimplemented-64-bit-mode-not-compiled-in) (links might be old, though). Also see [Sorry, unimplemented: 64 bit mode not compiled in](https://stackoverflow.com/questions/38589886/sorry-unimplemented-64-bit-mode-not-compiled-in), another high-vote answer from searching this site for "64 bit mode not compiled in". – JaMiT Dec 19 '20 at 03:23
-
Quick overview of your situation: you can create 32-bit executables, and they run under 64-bit Windows thanks to [WoW64](https://en.wikipedia.org/wiki/WoW64) (Windows-on-Windows, translating 32-bit programs to your 64-bit environment). – JaMiT Dec 19 '20 at 03:30
-
1Can you explain what you meant by: "I need to run a code "built as a 64bit executable"." What does it mean exactly? Why do you need to do this? Are you trying to learn C++ from a textbook, and that's the instructions from your textbook? Who told you that you need to do this, and why, exactly? – Sam Varshavchik Dec 19 '20 at 03:30
-
@SamVarshavchik I need to run a code written by someone else, and this is part of the instructions. I wasn't able to contact that person, so I am not sure what it means exactly. – JohnDoe122 Dec 19 '20 at 03:33
-
@JaMiT I am still a bit confused. I installed the compiler from here: http://www.codeblocks.org/downloads/binaries. It says there that " The default builds are 64 bit". I thought that would mean that it support 64-bit mode. – JohnDoe122 Dec 19 '20 at 03:34
-
1@BillKet That means that your **IDE** (Code::Blocks) is a 64-bit executable. The compiler is a separate program. (There is a compiler included with some Code::Blocks installations, but it is still a separate build, not necessarily a 64-bit executable, and even if the compiler is itself 64-bit, that does not guarantee -- likely, but not guaranteed -- being able to build 64-bit programs.) – JaMiT Dec 19 '20 at 03:45
-
1Perhaps you can try to find someone locally for you who has more development experience in building "code written by someone else"? It's hard enough to learn C++ yourself, building someone else's packaged code is several degrees of magnitude more complex, requiring one to decipher cryptic build/installation requirements. If you don't already know the basic steps to do that, to learn everything that needs to be learned to do something like that, simply by asking generic questions on SO, is unlikely to succeed. It takes time to learn this, and it can't just be summarized in 1-2 paragraphs. – Sam Varshavchik Dec 19 '20 at 04:08