ARTICLE AD BOX
Code:
#include <iostream> #include <exception> #include <stdexcept> int main() { std::cout << "HW\n"; try { std::cout << "Block\n"; throw std::runtime_error("Point 1"); std::cout << "Block Done\n"; } catch (std::exception const& e) { std::cout << "E: " << e.what() << "\n"; } catch (...) { std::cout << "E: Unknown\n"; } std::cout << "Done\n"; }If I compile normally, it works as expected:
> g++ main.cpp > # ./a.exe HW Block E: Point 1 DoneBut when you use the -mcmodel=large flag an exception caused terminate() to be called.
> g++ -mcmodel=large main.cpp > ./a.exe HW Block terminate called after throwing an instance of 'std::runtime_error' what(): Point 1I assume this is because it is linking against some incompatible libs. But not sure how to fix it.
All the packages I have installed:
autoconf automake make git gperf coreutils vim mingw-w64-x86_64-jq mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-libyaml mingw-w64-x86_64-dlfcn mingw-w64-x86_64-snappy mingw-w64-x86_64-libevent mingw-w64-x86_64-boost cmake ninja36.9k18 gold badges79 silver badges114 bronze badges
267k87 gold badges344 silver badges576 bronze badges
3
Explore related questions
See similar questions with these tags.
