User forums > Help

Compiles fine but always encounters problem when running the .exe

<< < (2/3) > >>

stahta01:
So you got a bad compiler or bad code; we do NOT support the Compiler and we do NOT support your code!

Tim S.

yvesdm3000:

--- Quote from: lifeisgood on March 27, 2017, 08:05:36 pm ---All I was trying to say was that programming mistake might be able to rule out... This is what I got from the compiler:


--- Quote ----------------- Clean: Debug in Tauchen (compiler: GNU GCC Compiler)---------------

Cleaned "Tauchen - Debug"

-------------- Build: Debug in Tauchen (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g  -c E:\BC\Courses\Pablo_Methods\HW\HW1\Tauchen.cpp -o obj\Debug\Tauchen.o
mingw32-g++.exe  -o bin\Debug\Tauchen.exe obj\Debug\Tauchen.o   
Output file is bin\Debug\Tauchen.exe with size 1.08 MB
Process terminated with status 0 (0 minute(s), 4 second(s))
0 error(s), 0 warning(s) (0 minute(s), 4 second(s))
 
--- End quote ---

I also tried compiling it from the command line and got the following message after trying to run the .exe file. This is the exact same message I got from running the above .exe file.
--- Quote ---terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more infomration.
--- End quote ---

--- End quote ---

The stdc++ library delivered with your compiler is probably not in your path. It's probably not installed correctly. As a workaround you might try to copy that dll next to your .exe file

Yves

stahta01:

--- Quote from: yvesdm3000 on March 27, 2017, 08:24:26 pm ---
--- Quote from: lifeisgood on March 27, 2017, 08:05:36 pm ---All I was trying to say was that programming mistake might be able to rule out... This is what I got from the compiler:


--- Quote ----------------- Clean: Debug in Tauchen (compiler: GNU GCC Compiler)---------------

Cleaned "Tauchen - Debug"

-------------- Build: Debug in Tauchen (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g  -c E:\BC\Courses\Pablo_Methods\HW\HW1\Tauchen.cpp -o obj\Debug\Tauchen.o
mingw32-g++.exe  -o bin\Debug\Tauchen.exe obj\Debug\Tauchen.o   
Output file is bin\Debug\Tauchen.exe with size 1.08 MB
Process terminated with status 0 (0 minute(s), 4 second(s))
0 error(s), 0 warning(s) (0 minute(s), 4 second(s))
 
--- End quote ---

I also tried compiling it from the command line and got the following message after trying to run the .exe file. This is the exact same message I got from running the above .exe file.
--- Quote ---terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more infomration.
--- End quote ---

--- End quote ---

The stdc++ library delivered with your compiler is probably not in your path. It's probably not installed correctly. As a workaround you might try to copy that dll next to your .exe file

Yves

--- End quote ---

Thank you for helping the OP.

I hate playing 20 question especially when I think the problem violates the rules of this site.
NOTE: Yves post implies that the problem should NOT have happened under Code::Blocks; but, would have happened when running from the command line. No idea if this is a fault of Code::Blocks IDE, the compiler, or CB Toolchain configuration error.

Tim S.

lifeisgood:

--- Quote from: stahta01 on March 27, 2017, 08:30:54 pm ---
Thank you for helping the OP.

I hate playing 20 question especially when I think the problem violates the rules of this site.
NOTE: Yves post implies that the problem should NOT have happened under Code::Blocks; but, would have happened when running from the command line. No idea if this is a fault of Code::Blocks IDE, the compiler, or CB Toolchain configuration error.

Tim S.

--- End quote ---

The problem happened in both cases. I did post the library file into the .exe file folder but there was still the problem of
--- Quote ---terminate called after throwing an instance of 'std::bad_alloc' what():
 std::bad_alloc This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
--- End quote ---
The compiler was installed prepackaged with Code Blocks because I used the codeblocks-16.01mingw-setup.exe for Windows. Maybe I will delete the previous instance of MinGW I previously installed and re-install codeblocks.

stahta01:
You have yet to state any information on the Compiler you think you are using!

Note: Nobody likely knows what compiler you are really using.

Post the CB Toolchain information and we will at least know what Compiler CB is set to use.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version