Не получается запустить программу на SFML - 12 ошибок типа "ссылка на неразрешенный внешний символ"

Код:

//#include <SFML/Graphics.hpp>
//#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
#include "iostream"
#include "string"
using namespace sf;
using namespace std;

//SERVER
class Server
{
private:
    IpAddress ip;
    unsigned short port;
    TcpSocket socket;
    TcpListener listener;
public:
    Server()
    {
        cout << "Enter port number: ";
        cin >> port;
        start();
    }
    Server(unsigned short port)
    {
        this->port = port;
        start();
    }
    void start()
    {
        if (listener.listen(port) != Socket::Done)
        {
            cout << "Error: cant use this port!" << endl;
            system("pause");
            return;
        }
        if (listener.accept(socket) != Socket::Done)
        {
            cout << "Error: cant up the server!" << endl;
            system("pause");
            return;
        }
        string msg = "Server run at: " + ip.toString();
        socket.send(msg.c_str(), 33);
    }
};

//CLIENT
class Client
{
private:
    unsigned short port;
    IpAddress ip;
    TcpSocket socket;
public:
    Client()
    {
        cout << "Enter server IP: ";
        cin >> ip;
        cout << "Enter server port number: ";
        cin >> port;
    }
    Client(string ip, unsigned short port)
    {
        this->ip = ip;
        this->port = port;
        start();
    }
    void start()
    {
        Socket::Status status = socket.connect(ip, port);
        if (status != Socket::Done)
        {
            cout << "Error: server is not online!" << endl;
            return;
        }
        socket.send("Hello, I'm client!", 18);
        /*while (true)
        {

        }*/
    }
};

void main()
{
    setlocale(LC_ALL, "");
    string type;
    cout << "Enter type ($server or $client): ";
    cin >> type;
    if (type == "$server")
    {
        Server * server = new Server();
    }
    else if (type == "$client")
    {
        Client * client = new Client();
    }
}

Зеленый кружок запускается, SFML подключен и нормально работает. Не работает только Network. Почему? Список ошибок (тут приведено нескольно, но они все похожи):

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl sf::TcpSocket::TcpSocket(void)" (__imp_??0TcpSocket@sf@@QEAA@XZ) в функции "public: __cdecl Client::Client(void)" (??0Client@@QEAA@XZ)    test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) public: enum sf::Socket::Status __cdecl sf::TcpSocket::send(void const *,unsigned __int64)" (__imp_?send@TcpSocket@sf@@QEAA?AW4Status@Socket@2@PEBX_K@Z) в функции "public: void __cdecl Server::start(void)" (?start@Server@@QEAAXXZ)    test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) public: virtual __cdecl sf::TcpSocket::~TcpSocket(void)" (__imp_??1TcpSocket@sf@@UEAA@XZ) в функции "int `public: __cdecl Client::Client(void)'::`1'::dtor$0" (?dtor$0@?0???0Client@@QEAA@XZ@4HA) test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl sf::IpAddress::IpAddress(void)" (__imp_??0IpAddress@sf@@QEAA@XZ) в функции "public: __cdecl Client::Client(void)" (??0Client@@QEAA@XZ)    test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl sf::IpAddress::toString(void)const " (__imp_?toString@IpAddress@sf@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) в функции "public: void __cdecl Server::start(void)" (?start@Server@@QEAAXXZ) test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) class std::basic_istream<char,struct std::char_traits<char> > & __cdecl sf::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class sf::IpAddress &)" (__imp_??5sf@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@AEAV12@AEAVIpAddress@0@@Z) в функции "public: __cdecl Client::Client(void)" (??0Client@@QEAA@XZ)  test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   

    Ошибка  LNK2019 ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl sf::TcpListener::TcpListener(void)" (__imp_??0TcpListener@sf@@QEAA@XZ) в функции "public: __cdecl Server::Server(void)" (??0Server@@QEAA@XZ)  test_sfml   C:\Users\zero\source\repos\test_sfml\test_sfml\Source.obj   1   


Ответы (0 шт):