Skip to content

Не собирается workshop1 #2

Description

@sergey-shambir

Сборка workshop1.1 не удалась

Scanning dependencies of target ws1.1
[ 50%] Building CXX object CMakeFiles/ws1.1.dir/main.o
[100%] Linking CXX executable ws1.1
CMakeFiles/ws1.1.dir/main.o: In function `init(sf::ConvexShape&)':
main.cpp:(.text+0x4b): undefined reference to `sf::Transformable::setPosition(sf::Vector2<float> const&)'
main.cpp:(.text+0x5c): undefined reference to `sf::ConvexShape::setPointCount(unsigned long)'
main.cpp:(.text+0x8d): undefined reference to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)'
main.cpp:(.text+0xbe): undefined reference to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)'
main.cpp:(.text+0xef): undefined reference to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)'
main.cpp:(.text+0x11c): undefined reference to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)'
main.cpp:(.text+0x14d): undefined reference to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)'
CMakeFiles/ws1.1.dir/main.o:main.cpp:(.text+0x17e): more undefined references to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)' follow
CMakeFiles/ws1.1.dir/main.o: In function `init(sf::ConvexShape&)':
main.cpp:(.text+0x1c7): undefined reference to `sf::Transformable::setRotation(float)'
main.cpp:(.text+0x1ec): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
main.cpp:(.text+0x1fb): undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
main.cpp:(.text+0x220): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
main.cpp:(.text+0x22f): undefined reference to `sf::Shape::setOutlineColor(sf::Color const&)'
main.cpp:(.text+0x243): undefined reference to `sf::Shape::setOutlineThickness(float)'
CMakeFiles/ws1.1.dir/main.o: In function `main':
main.cpp:(.text+0x2f4): undefined reference to `sf::String::String(char const*, std::locale const&)'
main.cpp:(.text+0x312): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
main.cpp:(.text+0x345): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
main.cpp:(.text+0x377): undefined reference to `sf::ConvexShape::ConvexShape(unsigned long)'
main.cpp:(.text+0x395): undefined reference to `sf::Window::isOpen() const'
main.cpp:(.text+0x3b6): undefined reference to `sf::Window::pollEvent(sf::Event&)'
main.cpp:(.text+0x3d3): undefined reference to `sf::Window::close()'
main.cpp:(.text+0x3e5): undefined reference to `sf::Color::White'
main.cpp:(.text+0x3ed): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
main.cpp:(.text+0x404): undefined reference to `sf::RenderStates::Default'
main.cpp:(.text+0x40f): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
main.cpp:(.text+0x41e): undefined reference to `sf::Window::display()'
main.cpp:(.text+0x441): undefined reference to `sf::RenderWindow::~RenderWindow()'
main.cpp:(.text+0x4ae): undefined reference to `sf::RenderWindow::~RenderWindow()'

Стоит ознакомиться с документом Типичные ошибки в лабораторных

Также советую скачать с Github zip-архив с исходным кодом, распаковать и попробовать собрать в терминале Visual Studio Code - так вы увидите ошибки сборки. Скачать можно по кнопке Download ZIP:
default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions