I recently just upgraded to OSX Yosemite on my Mac and while I'm not sure if this is the cause, it does seem suspicious that suddenly all of My C++ Programs throw a Segmentation Fault.
I even tried the basic of all basic "Hello World" programs and I still get a Segmentation Fault. Literally, every single C++ program does the same.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
}
I installed the Xcode updates to see if that would remedy the situation but no luck. I'm curious, is anyone else out there having the same problem? Regardless of Yosemite, have you had this problem where your Mac throws Segmentation faults for everything?
I should add, I'm compiling with g++
After a few more tries I have found a workaround from here:
http://lists.gnu.org/archive/html/libtool-patches/2014-09/msg00002.html
Simply
setenv MACOSX_DEPLOYMENT_TARGET 10.9
or
export MACOSX_DEPLOYMENT_TARGET=10.9
Happily works after that. However, proper bug fixes should be forthcoming from libtool, so watch the progress there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With