c++ - OpenCV: cannot compile when using imwrite() function -


in simple first opencv application want save frames got cam using imwrite() tutorial say. problem, can't compile because error:

undefined symbols architecture x86_64: "cv::imwrite(cv::string const&, cv::_inputarray const&, std::vector<int,  std::allocator<int> > const&)", referenced from: _main in video-87ad7a.o ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) 

reading posts here in have discovered it's problem c++ standard library used, added flag libstdc++ following:

g++ -stdlib=libstdc++ -i/usr/local/include -l/usr/local/lib/ -g -o binary video.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_stitching -lopencv_videoio -lopencv_videostab 

has not solved problem. how shall do?

update seems this solution. don't know damned flag missing

looks missing '-lopencv_imgcodecs' imwrite() lives.
refer opencv imgcodecs header file here.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -