C ++ SFML编译错误+安装

时间:2016-12-04 06:39:19

标签: c++ sfml

嘿,我在编译sfml代码时一直遇到这个错误。

    root@ubuntu:/home/bugtraq# g++ ttt.o -L /home/me/lib -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: warning: libudev.so.1, needed by /home/me/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_get_action@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_list_entry_get_next@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_unref@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_list_entry_get_name@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_enumerate_unref@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_monitor_unref@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_new@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_monitor_receive_device@LIBUDEV_183'
/home/me/lib/libsfml-graphics.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_get_devnode@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_monitor_enable_receiving@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_enumerate_new@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_monitor_get_fd@LIBUDEV_183'
/home/me/lib/libsfml-graphics.so: undefined reference to `__cpu_model@GCC_4.8.0'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_unref@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_get_property_value@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_monitor_filter_add_match_subsystem_devtype@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_enumerate_get_list_entry@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_enumerate_scan_devices@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_enumerate_add_match_subsystem@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_get_syspath@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_get_sysattr_value@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_monitor_new_from_netlink@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_new_from_syspath@LIBUDEV_183'
/home/me/lib/libsfml-window.so: undefined reference to `udev_device_get_parent_with_subsystem_devtype@LIBUDEV_183'
collect2: ld returned 1 exit status

我正在使用的代码是来自SFML官方网页的代码。 我不是没有,如果我正确安装它,但我做了一个名为的文件夹 /家/我/ 并解开SFML4并将其转换为/ home / me / SFML 当我做g ++ -Ctt.cpp时,它可以工作,但最后一部分。

g ++ ttt.o -L / home / me / lib -lsfml-graphics -lsfml-window -lsfml-system

给我错误代码任何帮助?

0 个答案:

没有答案