I'm using the google glog library for my C++ program. I have used the glog library before, so I know that it should print out the stack trace when there is a CHECK failure. But it does not print any stack trace for my program:
#include <glog/logging.h>
void bar(int x) {
CHECK_EQ(x, 1);
}
void foo(int x) {
bar(x + 1);
}
int main() {
foo(1);
}
The Makefile is
all: Makefile test.cpp
g++ -g -O3 test.cpp -lglog -o test
And the output I'm getting is
$ ./test
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0629 14:09:45.900789 37730 test.cpp:4] Check failed: x == 1 (2 vs. 1)
*** Check failure stack trace: ***
Aborted
Am I missing something here?
Thank you!
Cui