I'm trying to compile the following code using Codebloks Nightly svn 9916
#include "Main.h"
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!" << endl;
return 0;
}
Running the executable from inside Codeblocks, it returns Hello World!
as expected to. But if the executable is started from outside it returns an application error 0xc000007b
. It means that either the System type (32bit or 64bit) doesn't fit, or that the executable is broken. But I don't understand why the the compilation is fine while executing from Codeblocks.
The executable itself is 32bit (x86) and running it from a 32bit or 64bit cmd doesn't make a change.
Data: Windows 7 Professional 64 Bit GNU GCC Compiler
EDIT: Workarround
Statically linking the c++ library against the executable works. It seems like windows can't execute it if the c++ standard library isn't available.