I am having a problem in understanding the trouble with running the exe frile created using GCC.
When I started learning C++, I read lower level languages like C/C++ creates exe which is in assembly code while higher level languages like VB.net and C# creates exe that is interpreted by run time interpreter.
If that is the case, then is it not reasonable to expect the C++ exe to run in any computer without the need for other supporting libraries. I developed a C++ exe using GCC and when I tried to run in another computer that did not have gcc installed, it gave me the usual errors such as libstdgcc...dll not available and such. Is the error cause because I am creating a debug exe and it would go away with a release exe?
Or is my understanding of the types of exe created by C/C++ totally wrong?
They will still need any runtime dependencies you may have. They don't need a compiler to run it, but they should either have the dependencies already installed in the proper place, or they should be bundled with the exe. Yes, everything does get compiled down to assembly, but chances are that assembly is still going to call code from other files.
Since it says a DLL is missing, that's just a case of missing dependencies. DLL = Dynamic Link Library, ie that code is not bundled with the exe and will get called at some point during runtime. You can fix this by statically linking all your dependencies or making sure all target computers have them installed properly.
When a program is built with debugging symbols, the executable usually becomes dependent on the compiler's debugging facilities which means the executable requires the libraries which contain the debugging functions.
When a program is built without debugging symbols (aka "[tt]release[/i]" mode), all debugging symbols are stripped from the final executable so that the program stands alone without the need of additional libraries.
However, all compilers generate different assembly output, regardless of whether or not the compiler conforms to the standard. In addition, compiler options, such as optimisations, alter the assembly output further -- irrespective of assembly output, the output will execute on the host CPU assuming that the program was built for it [the CPU].