-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
stitching modules conflicts with googlelog (glog) because of LOG macro #6960
Copy link
Copy link
Closed
Description
System information (version)
- OpenCV => trunk
- Operating System / Platform => Ubuntu 14.04 LTS
- Compiler => gcc 4.9.3
Detailed description
Using Google log (glog) along with the stitching module will cause compilation error. It's because glog defines the "LOG" macro and the stitching module also defines it at /opencv/modules/stitching/include/opencv2/stitching/detail/util.hpp. A possible resolution is append "CV_" for the "LOG" macro and make it "CV_LOG" instead in the stitching module.
Steps to reproduce
#include "glog/logging.h"
#include "opencv2/opencv.hpp"
#include "opencv2/stitching.hpp"
int main(int argc, char **argv)
{
google::InitGoogleLogging(argv[0]);
LOG(INFO) << "hello world";
return 0;
}
results in compilation error. Remove
#include "opencv2/stitching.hpp"
and it compiles.
Reactions are currently unavailable