Skip to content

Does not compile #8

@SirFireball3521

Description

@SirFireball3521

Hi, I'm trying to run this on Linux but I'm getting an error when I try to compile it:

/usr/bin/ld: /tmp/ccAVgtoO.o: in function `main':
Main.cpp:(.text+0x507): undefined reference to `Universe::Universe(unsigned long, unsigned long, int, int)'
/usr/bin/ld: Main.cpp:(.text+0x551): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0x651): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
/usr/bin/ld: Main.cpp:(.text+0x680): undefined reference to `sf::String::String(char const*, std::locale const&)'
/usr/bin/ld: Main.cpp:(.text+0x6b3): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
/usr/bin/ld: Main.cpp:(.text+0x6e5): undefined reference to `sf::Window::setFramerateLimit(unsigned int)'
/usr/bin/ld: Main.cpp:(.text+0x6f9): undefined reference to `sf::Window::setVerticalSyncEnabled(bool)'
/usr/bin/ld: Main.cpp:(.text+0x70d): undefined reference to `sf::RenderWindow::setActive(bool)'
/usr/bin/ld: Main.cpp:(.text+0x71c): undefined reference to `sf::Window::requestFocus()'
/usr/bin/ld: Main.cpp:(.text+0x72b): undefined reference to `sf::Clock::Clock()'
/usr/bin/ld: Main.cpp:(.text+0x749): undefined reference to `sf::Window::close()'
/usr/bin/ld: Main.cpp:(.text+0x781): undefined reference to `sf::Window::close()'
/usr/bin/ld: Main.cpp:(.text+0x7a8): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0x7f2): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0x819): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0x863): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0x88a): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0x8d4): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0x8fb): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0x945): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0x96c): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0x9b6): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0x9dd): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0xa2b): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0xa52): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0xa9c): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0xac3): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0xb0d): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0xb34): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0xb82): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0xba9): undefined reference to `Universe::SetPopulation(unsigned long, unsigned long)'
/usr/bin/ld: Main.cpp:(.text+0xbf7): undefined reference to `Universe::ReSeed(float, float, float, float, float, float, float, bool)'
/usr/bin/ld: Main.cpp:(.text+0xc31): undefined reference to `Universe::SetRandomParticles()'
/usr/bin/ld: Main.cpp:(.text+0xc4e): undefined reference to `Universe::PrintParams() const'
/usr/bin/ld: Main.cpp:(.text+0xd4d): undefined reference to `sf::Clock::getElapsedTime() const'
/usr/bin/ld: Main.cpp:(.text+0xd63): undefined reference to `sf::Time::asMilliseconds() const'
/usr/bin/ld: Main.cpp:(.text+0xd8b): undefined reference to `sf::Mouse::getPosition(sf::Window const&)'
/usr/bin/ld: Main.cpp:(.text+0xdbe): undefined reference to `Universe::ToCenter(int, int, float&, float&) const'
/usr/bin/ld: Main.cpp:(.text+0xdfe): undefined reference to `Universe::GetIndex(int, int) const'
/usr/bin/ld: Main.cpp:(.text+0xe34): undefined reference to `sf::Window::pollEvent(sf::Event&)'
/usr/bin/ld: Main.cpp:(.text+0xe5c): undefined reference to `Universe::GetParticleX(int) const'
/usr/bin/ld: Main.cpp:(.text+0xe7d): undefined reference to `Universe::GetParticleY(int) const'
/usr/bin/ld: Main.cpp:(.text+0xf52): undefined reference to `Universe::Zoom(float, float, float)'
/usr/bin/ld: Main.cpp:(.text+0xf76): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
/usr/bin/ld: Main.cpp:(.text+0xf93): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
/usr/bin/ld: Main.cpp:(.text+0xfd7): undefined reference to `Universe::Step()'
/usr/bin/ld: Main.cpp:(.text+0xffa): undefined reference to `Universe::Draw(sf::RenderWindow&, float) const'
/usr/bin/ld: Main.cpp:(.text+0x101e): undefined reference to `sf::Window::display()'
/usr/bin/ld: Main.cpp:(.text+0x102d): undefined reference to `sf::Window::isOpen() const'
/usr/bin/ld: Main.cpp:(.text+0x1049): undefined reference to `sf::RenderWindow::~RenderWindow()'
/usr/bin/ld: Main.cpp:(.text+0x10a5): undefined reference to `sf::RenderWindow::~RenderWindow()'
collect2: error: ld returned 1 exit status```

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