0

I've been using Code::Blocks on Windows 64-bit to learn programming, but it's causing me problems.

Mainly, the code works just fine when going into Code::Blocks and running it, but when I try to launch it directly from the .exe in the bin/ subfolder, I encounter multiple errors. It initially never finds the .dll files, but when I put them in the same folder, I get the "Couldn't launch app properly (0xc0000007b)" error (the message might be wrong, I translated it). After looking up some things, I found that it might be a conflict between 32 and 64 bit libraries; however, I checked all my .dll files and they were all 32 bits, like Code::Blocks.

Is there a way to fix it, or do I have to change my IDE completely to work on 64 bits and 64 bits only?

EDIT: For anyone wondering, the problem was coming from having the wrong .dll files. Basically, I found the 32 bit ones, while I was supposed to be looking for the 64 bit ones in the compiler's files. Thanks to everyone for their advice !

KrozmaSan
  • 3
  • 3
  • It has nothing to do with your IDE. (it works in the IDE due to the runtime options it has configured). You need to find, understand and mimic those options when running from the command line, etc.. If you need to find which dll you dependencies your code depends on, see [How to check for DLL dependency?](https://stackoverflow.com/q/7378959/3422102) See also [C DLL In Code::Blocks](https://stackoverflow.com/q/16668552/3422102) – David C. Rankin Jan 08 '21 at 08:24
  • What compiler are you using? Code::blocks can use MinGW or the native VS compiler. Do you know which you have? That will make a difference to the answers you get. – David C. Rankin Jan 08 '21 at 08:29
  • You might be using a 32 bit Mingw that came as default with the Codeblocks download. Try installing the 64 bit version, instructions [here](https://stackoverflow.com/a/34220462/584518). – Lundin Jan 08 '21 at 08:35
  • Or if you are using Code::Blocks 20:03 with the 32-bit compiler on a 32-bit system the compiler is broken and actually includes the 64-bit toolchain (I wrote the bug for that [Code::Blocks 20.03 Compiler Mismatch](https://sourceforge.net/p/codeblocks/tickets/970/)) – David C. Rankin Jan 08 '21 at 08:37
  • This is completely unrelated to your ide. The only possible explanation is that you either copied the wrong `.dll`s, or copied not all of them. – HolyBlackCat Jan 08 '21 at 09:34
  • See linked thread, see section ".dll-related errors". If it doesn't help, please tell us. – HolyBlackCat Jan 08 '21 at 09:37

0 Answers0