Program Stopped Working (MinGW)

Started by
2 comments, last by TheComet 10 years, 1 month ago

This is a very strange problem. I'm unit testing C-source files using a C++ testing framework (google test). For this to work, I've taken care of all the necessary "#ifdef __cplusplus, extern "C", #endif" statements in the C header files to satisfy the linker.

I'm using MinGW on a Windows 7 machine, gcc 4.7.2. The IDE I'm using is Code::Blocks.

The unit tests run perfectly fine if I build them from withing the IDE, but if I try to build them using make in the command line, upon executing the successfully built application, I get the error: "Test.exe has stopped working".

What could be causing this and how do I diagnose the error?

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
Advertisement
There is a multitude of possible problems but I would probably start with ensuring all runtime dependencies of the program (starting with the C++ runtime) are available when using the command line.

Try to reproduce the problem with an unoptimized build with debugging information (-O0 -g). If that works, run it under the debugger and see where it breaks.

There is a multitude of possible problems but I would probably start with ensuring all runtime dependencies of the program (starting with the C++ runtime) are available when using the command line.

Yes, this was indeed the issue. libstdc++-6 was trying to be loaded, but was not in the path of the executable.

Thanks! I knew it was something simple.

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty

This topic is closed to new replies.

Advertisement