Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


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 TheComet   Crossbones+   -  Reputation: 1618

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?


YOUR_OPINION >/dev/null

Sponsor:

#2 BitMaster   Crossbones+   -  Reputation: 4222

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 Álvaro   Crossbones+   -  Reputation: 13629

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 TheComet   Crossbones+   -  Reputation: 1618

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.


YOUR_OPINION >/dev/null




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