nyanp / mnisten

convert image files to mnist idx format
61 stars 30 forks source link

[Mnisten Installation]Error:ld: symbol(s) not found for architecture x86_64 #17

Open YilinLiu97 opened 7 years ago

YilinLiu97 commented 7 years ago

Hi all, I'm stuck on this error when I'm trying to install Mnisten on mac. Really appreciate any help!

g++ -Wall -O2 -lboost_filesystem-mt -std=c++0x -o mnisten src/main.cpp Undefined symbols for architecture x86_64: "cv::_InputArray::_InputArray(cv::Mat const&)", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o "cv::_OutputArray::_OutputArray(cv::Mat&)", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o "cv::MatConstIterator::seek(int const, bool)", referenced from: void gen_mnist_images<std::1::wrap_iter<image> >(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::wrap_iter<image>, std::1::wrap_iter<image>) in main-662cae.o cv::MatIterator_ cv::Mat::end() in main-662cae.o "cv::MatConstIterator::seek(long, bool)", referenced from: void gen_mnist_images<std::1::wrap_iter<image> >(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::wrap_iter<image>, std::1::wrapiter<image*>) in main-662cae.o cv::MatIterator cv::Mat::end() in main-662cae.o "cv::Mat::deallocate()", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o void std::1::shuffle<std::1::wrap_iter<image>, std::1::linear_congruential_engine<unsigned int, 48271u, 0u, 2147483647u> >(std::1::__wrap_iter<image>, std::1::wrap_iter<image*>, std::1::linear_congruential_engine<unsigned int, 48271u, 0u, 2147483647u>&&) in main-662cae.o std::1::__vector_base<image, std::1::allocator >::~vector_base() in main-662cae.o std::1::split_buffer<image, std::1::allocator&>::~split_buffer() in main-662cae.o cv::Mat::operator=(cv::Mat const&) in main-662cae.o "cv::Mat::copySize(cv::Mat const&)", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o void std::1::shuffle<std::1::wrap_iter<image>, std::1::linear_congruential_engine<unsigned int, 48271u, 0u, 2147483647u> >(std::1::__wrap_iter<image>, std::1::wrap_iter<image>, std::1::linear_congruential_engine<unsigned int, 48271u, 0u, 2147483647u>&&) in main-662cae.o void std::1::vector<image, std::1::allocator >::push_back_slow_path<image const&>(image const&&&) in main-662cae.o std::1::vector<image, std::1::allocator >::swap_out_circular_buffer(std::1::split_buffer<image, std::1::allocator&>&) in main-662cae.o cv::Mat::operator=(cv::Mat const&) in main-662cae.o "cv::imread(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, int)", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o "cv::resize(cv::_InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o "cv::fastFree(void)", referenced from: read_images(boost::filesystem::path const&, unsigned char, std::1::vector<image, std::1::allocator >&, int, int) in main-662cae.o void std::1::shuffle<std::1::wrap_iter<image>, std::1::linear_congruential_engine<unsigned int, 48271u, 0u, 2147483647u> >(std::1::__wrap_iter<image>, std::1::wrap_iter<image*>, std::1::linear_congruential_engine<unsigned int, 48271u, 0u, 2147483647u>&&) in main-662cae.o std::1::__vector_base<image, std::1::allocator >::~vector_base() in main-662cae.o std::1::split_buffer<image, std::1::allocator&>::~split_buffer() in main-662cae.o "boost::system::system_category()", referenced from: GLOBAL__sub_I_main.cpp in main-662cae.o "boost::system::generic_category()", referenced from: GLOBALsub_I_main.cpp in main-662cae.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [mnisten] Error 1