Jump to content

  • Log In with Google      Sign In   
  • Create Account

Program Stopped Working (MinGW)


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1   Crossbones+   -  Reputation: 2594

Like
0Likes
Like

Posted 25 March 2014 - 07:04 AM

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?


"Windows 10 doesn't only include spyware, it is designed as spyware" -- Gaius Publius, The Big Picture RT Interview

"[...] we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary" -- Windows 10 Privacy Statement


#2   Crossbones+   -  Reputation: 8647

Like
0Likes
Like

Posted 25 March 2014 - 07:16 AM

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.

#3   Crossbones+   -  Reputation: 19712

Like
0Likes
Like

Posted 25 March 2014 - 07:25 AM

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.



#4   Crossbones+   -  Reputation: 2594

Like
1Likes
Like

Posted 25 March 2014 - 08:25 AM

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.


"Windows 10 doesn't only include spyware, it is designed as spyware" -- Gaius Publius, The Big Picture RT Interview

"[...] we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary" -- Windows 10 Privacy Statement





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS