ahodesuka / ahoviewer

A GTK image viewer, manga reader, and booru browser
MIT License
486 stars 31 forks source link

Several "undefined reference to [libcurl function]" messages. #45

Closed theshowmustgoon closed 8 years ago

theshowmustgoon commented 8 years ago

I was trying to build this on Linux Mint 18 and I think I had installed all of the required dependencies, but it gives me several messages about various libcurl methods not being defined. I tried looking this problem up and apparently it has to do with libcurl not being linked in C++, but I have no idea how to fix that. Here's the messages that show up when I try to do 'make' again after doing that command the first time.

Making all in pixmaps make[1]: Entering directory '/home/james/Downloads/ahoviewer-master/pixmaps' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/james/Downloads/ahoviewer-master/pixmaps' Making all in po make[1]: Entering directory '/home/james/Downloads/ahoviewer-master/po' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/james/Downloads/ahoviewer-master/po' Making all in src make[1]: Entering directory '/home/james/Downloads/ahoviewer-master/src' make all-am make[2]: Entering directory '/home/james/Downloads/ahoviewer-master/src' CXXLD ahoviewer archive/ahoviewer-archive.o: In function AhoViewer::TempDir::remove_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/james/Downloads/ahoviewer-master/src/./tempdir.h:45: undefined reference toGlib::DirIterator::operator_() const' archive/ahoviewer-archive.o: In function TempDir': /home/james/Downloads/ahoviewer-master/src/./tempdir.h:57: undefined reference toGlib::get_tmp_dir()' booru/ahoviewer-image.o: In function AhoViewer::Booru::Curler::get_error() const': /home/james/Downloads/ahoviewer-master/src/booru/curler.h:48: undefined reference tocurl_easy_strerror' booru/ahoviewer-page.o: In function AhoViewer::Booru::Curler::get_error() const': /home/james/Downloads/ahoviewer-master/src/booru/curler.h:48: undefined reference tocurl_easy_strerror' ahoviewer-image.o: In function __cxx_global_var_init.14': /home/james/Downloads/ahoviewer-master/src/image.cc:9: undefined reference toGlib::get_user_cache_dir()' ahoviewer-imagelist.o: In function AhoViewer::ImageList::on_directory_changed(Glib::RefPtr<Gio::File> const&, Glib::RefPtr<Gio::File> const&, Gio::FileMonitorEvent)': /home/james/Downloads/ahoviewer-master/src/imagelist.cc:360: undefined reference toGio::File::get_path() const' /home/james/Downloads/ahoviewer-master/src/imagelist.cc:367: undefined reference to Gio::File::get_path() const' /home/james/Downloads/ahoviewer-master/src/imagelist.cc:351: undefined reference toGio::File::get_path() const' ahoviewer-imagelist.o: In function operator()': /home/james/Downloads/ahoviewer-master/src/imagelist.cc:316: undefined reference toGio::File::get_path() const' ahoviewer-imagelist.o: In function void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_range_initialize<Glib::DirIterator>(Glib::DirIterator, Glib::DirIterator, std::input_iterator_tag)': /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_vector.h:1274: undefined reference toGlib::DirIterator::operator_() const' ahoviewer-main.o: In function main': /home/james/Downloads/ahoviewer-master/src/main.cc:21: undefined reference tocurl_global_init' /home/james/Downloads/ahoviewer-master/src/main.cc:52: undefined reference to curl_global_cleanup' ahoviewer-mainwindow.o: In functionAhoViewer::MainWindow::open_file(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool)': /home/james/Downloads/ahoviewer-master/src/mainwindow.cc:182: undefined reference to Glib::filename_from_uri(Glib::ustring const&)' /home/james/Downloads/ahoviewer-master/src/mainwindow.cc:187: undefined reference toGlib::get_current_dir()' ahoviewer-mainwindow.o: In function AhoViewer::MainWindow::on_drag_data_received(Glib::RefPtr<Gdk::DragContext> const&, int, int, Gtk::SelectionData const&, unsigned int, unsigned int)': /home/james/Downloads/ahoviewer-master/src/mainwindow.cc:286: undefined reference toGlib::filename_from_uri(Glib::ustring const&)' ahoviewer-mainwindow.o: In function AhoViewer::MainWindow::on_open_recent_file()': /home/james/Downloads/ahoviewer-master/src/mainwindow.cc:850: undefined reference toGlib::filename_from_uri(Glib::ustring const&)' ahoviewer-settings.o: In function SettingsManager': /home/james/Downloads/ahoviewer-master/src/settings.cc:15: undefined reference toGlib::get_user_config_dir()' booru/ahoviewer-curler.o: In function AhoViewer::Booru::Curler::write_cb(unsigned char const*, unsigned long, unsigned long, void*)': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:23: undefined reference tocurl_easy_getinfo' booru/ahoviewer-curler.o: In function Curler': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:53: undefined reference tocurl_easy_init' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:59: undefined reference to curl_easy_setopt' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:60: undefined reference tocurl_easy_setopt' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:61: undefined reference to curl_easy_setopt' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:62: undefined reference tocurl_easy_setopt' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:63: undefined reference to curl_easy_setopt' booru/ahoviewer-curler.o:/home/james/Downloads/ahoviewer-master/src/booru/curler.cc:64: more undefined references tocurl_easy_setopt' follow booru/ahoviewer-curler.o: In function ~Curler': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:82: undefined reference tocurl_easy_cleanup' booru/ahoviewer-curler.o: In function AhoViewer::Booru::Curler::set_no_body(bool) const': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:93: undefined reference tocurl_easy_setopt' booru/ahoviewer-curler.o: In function AhoViewer::Booru::Curler::set_follow_location(bool) const': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:98: undefined reference tocurl_easy_setopt' booru/ahoviewer-curler.o: In function AhoViewer::Booru::Curler::set_referer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:103: undefined reference tocurl_easy_setopt' booru/ahoviewer-curler.o: In function AhoViewer::Booru::Curler::set_http_auth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:110: undefined reference tocurl_easy_setopt' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:111: undefined reference to curl_easy_setopt' booru/ahoviewer-curler.o:/home/james/Downloads/ahoviewer-master/src/booru/curler.cc:117: more undefined references tocurl_easy_setopt' follow booru/ahoviewer-curler.o: In function AhoViewer::Booru::Curler::escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:134: undefined reference tocurl_easy_escape' /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:139: undefined reference to curl_free' booru/ahoviewer-curler.o: In functionAhoViewer::Booru::Curler::perform()': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:150: undefined reference to curl_easy_perform' booru/ahoviewer-curler.o: In functionAhoViewer::Booru::Curler::get_response_code() const': /home/james/Downloads/ahoviewer-master/src/booru/curler.cc:164: undefined reference to curl_easy_getinfo' booru/ahoviewer-imagefetcher.o: In functionAhoViewer::Booru::ImageFetcher::socketcb(void, int, int, void, void)': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:19: undefined reference to curl_multi_assign' booru/ahoviewer-imagefetcher.o: In functionAhoViewer::Booru::ImageFetcher::event_cb(int, Glib::IOCondition)': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:114: undefined reference to curl_multi_socket_action' booru/ahoviewer-imagefetcher.o: In functionAhoViewer::Booru::ImageFetcher::timeout_cb()': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:129: undefined reference to curl_multi_socket_action' booru/ahoviewer-imagefetcher.o: In functionImageFetcher': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:53: undefined reference to curl_multi_init' /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:58: undefined reference tocurl_multi_setopt' /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:59: undefined reference to curl_multi_setopt' /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:60: undefined reference tocurl_multi_setopt' /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:61: undefined reference to curl_multi_setopt' booru/ahoviewer-imagefetcher.o: In function~ImageFetcher': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:75: undefined reference to curl_multi_cleanup' booru/ahoviewer-imagefetcher.o: In functionAhoViewer::Booru::ImageFetcher::removehandle(AhoViewer::Booru::Curler)': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:100: undefined reference to curl_multi_remove_handle' booru/ahoviewer-imagefetcher.o: In functionAhoViewer::Booru::ImageFetcher::addhandle(AhoViewer::Booru::Curler)': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:82: undefined reference to curl_easy_setopt' /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:88: undefined reference tocurl_multi_add_handle' booru/ahoviewer-imagefetcher.o: In function AhoViewer::Booru::ImageFetcher::read_info()': /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:141: undefined reference tocurl_multi_info_read' /home/james/Downloads/ahoviewer-master/src/booru/imagefetcher.cc:146: undefined reference to `curl_easygetinfo' clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:511: recipe for target 'ahoviewer' failed make[2]: ** [ahoviewer] Error 1 make[2]: Leaving directory '/home/james/Downloads/ahoviewer-master/src' Makefile:374: recipe for target 'all' failed make[1]: * [all] Error 2 make[1]: Leaving directory '/home/james/Downloads/ahoviewer-master/src' Makefile:464: recipe for target 'all-recursive' failed make: * [all-recursive] Error 1

Let me know if you need other files to figure out what's going on.

ahodesuka commented 8 years ago

Looks like it is also unable to link some Glib methods. What version of g++, libcurl, and glibmm do you have installed? Are you sure you have the development versions of libcurl and glibmm installed?