User forums > Help

can't execute .exe in bin folder 0xc000007b

(1/2) > >>

Brissou72:
Hello I ve just finished a small program. I can build it and run directly from codeblocks and it works perfectly. But when i try to use the exe, it tells me "0xc000007b" before that I ve had to add dll file in the exe folder (libgcc_s_seh-1.dll and libwinpthread-1.dll).

I don't know if it is important but for my program i used :
#include <windows.h> , #include <stdio.h>, #include <tchar.h>, #include <psapi.h>, #include <chrono>, #include <thread>, #include <functional>
linkers Kernel32.lib and psapi.lib.

It s not depending on my machine, because it does the same on every machine.

Thanks for your help.






Miguel Gimenez:
You are mixing 64 and 32-bit code, replace the DLLs with other versions using the same bitness of the executable.

Brissou72:
Hello, so basically bitness of executable is 64. but there is 1 dll i cannot find in 64 so I ve tried to switch my exe in 32, but at this moment on CB it gives me a lot of compiling errors ("cannot find"):

ld.exe||cannot find -lstdc++|
ld.exe||cannot find -lmingw32|
ld.exe||cannot find -lgcc|
ld.exe||cannot find -lgcc_eh|
ld.exe||cannot find -lmoldname|
ld.exe||cannot find -lmingwex|
ld.exe||cannot find -lmsvcrt|
ld.exe||cannot find -lpthread|
ld.exe||cannot find -ladvapi32|
ld.exe||cannot find -lshell32|
ld.exe||cannot find -luser32|
ld.exe||cannot find -lkernel32|
ld.exe||cannot find -liconv|
ld.exe||cannot find -lmingw32|
ld.exe||cannot find -lgcc|
ld.exe||cannot find -lgcc_eh|
ld.exe||cannot find -lmoldname|
ld.exe||cannot find -lmingwex|
ld.exe||cannot find -lmsvcrt|

i m little bit lost...

gd_on:
If a program work inside codeblocks but fails when you launch it as standalone (outside codeblocks) this clearly indicates that something is missing in the system path : have a look in logs & other window : you can see that C::B displays the path it uses for itself when a program is launched.
I suggest to add in your system path, the bin folders of your compiler : it contains all the needed dll. Don't switch to 32 bits if you have not installed a 32 bits compiler, it won't work.
An other solution, is to add the needed dlls in the same folder than your exe. Nice if you want to distribute your program, but not for using on your computer for several programs (you'll have many copies of the same dlls ...)

Brissou72:
OK tanks for your advice, i switched back to 64 bit and put the 2 dll files in the exe directory and go back to the error "0xc000007b".
libwinpthread-1.dll is 32 bits.
libgcc_s_seh-1.dll is 32 bits.

Navigation

[0] Message Index

[#] Next page

Go to full version