Small corrections for GCC 4.4

Hello!

I just tried to run the last release and wasn’t able to compile… after looking at the errors it remind me that I was using a newer version of GCC (I had to install it to build Opencv2) wish involves some changes to make it works with OF…

So if anyone needs to use OF with GCC 4.4 here’s a little include to add to the core. I’m not sure about the new features of GCC 4.4 but it seems like you need to include everything, … anyway if you don’t include them you will get errors with code::blocks on windows :

in ofConstants.h lines 125-129:

  
  
#ifndef __MWERKS__  
#define OF_EXIT_APP(val)		std::exit(val);  
#else  
#define OF_EXIT_APP(val)		std::exit(val);  
#endif  
  

becomes:

  
  
#ifndef __MWERKS__  
#include <cstdlib>  
#define OF_EXIT_APP(val)		std::exit(val);  
#else  
#define OF_EXIT_APP(val)		std::exit(val);  
#endif  
  

If you don’t include cstdlib, exit won’t be reconized and so OF_EXIT_APP won’t be neither. As the errors are inside ofQtUtils, it could be a bit confusing :

||=== openFrameworksLib, release ===|
F:\JOBS\of_preRelease_v0061_all\libs\openFrameworks\video\ofQtUtils.cpp||In function ‘void initializeQuicktime()’:expressionless:
F:\JOBS\of_preRelease_v0061_all\libs\openFrameworks\video\ofQtUtils.cpp|22|error: ‘exit’ is not a member of ‘std’|
F:\JOBS\of_preRelease_v0061_all\libs\openFrameworks\video\ofQtUtils.cpp|29|error: ‘exit’ is not a member of ‘std’|
||=== Build finished: 2 errors, 0 warnings ===|

I don’t know if it should be added to the core but at least now it’s here if it’s useful for someone!

_PS: In release 6 I had to add this one to Poco too but it seems that it isn’t needed anymore:
in Poco/FIFOStrategy.h:

  
  
#include <memory>  
  

_

Thank you for this post. I just downloaded Code::Blocks version 10.5 for Windows with minGW which is using GCC4.4.1 and I encountered this problem.

Your fix worked like a charm. Thanks.

this is fixed in r62 which is on github, but using another approach http://forum.openframeworks.cc/t/new-code::blocks-10.05-quot;exit-is-not-a-memberquot;-fix/4048/0

hi dude
just find the solution
key works is ArtoolkitPlus and GCC 4.4
becox ARTK 2.1.1 not support gcc 4.4
here is the reference
http://www.rojtberg.net/318/artoolkitplus-2-1-3/
cheer