Hello. I read the documentation(Connecting a TCP socket) and this is my code:
#include <SFML/Network.hpp>
using namespace std;
int main()
{
sf::TcpSocket socket;
sf::Socket::Status status = socket.connect("192.168.0.5", 53000);
if (status != sf::Socket::Done)
{
// error...
}
return 0;
}
The Debug said:
||=== Build: Debug in chat (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\Users\Emil\Desktop\C++\chat\main.cpp|7|undefined reference to `_imp___ZN2sf9TcpSocketC1Ev'|
C:\Users\Emil\Desktop\C++\chat\main.cpp|8|undefined reference to `_imp___ZN2sf9IpAddressC1EPKc'|
C:\Users\Emil\Desktop\C++\chat\main.cpp|8|undefined reference to `_imp___ZN2sf4Time4ZeroE'|
C:\Users\Emil\Desktop\C++\chat\main.cpp|8|undefined reference to `_imp___ZN2sf9TcpSocket7connectERKNS_9IpAddressEtNS_4TimeE'|
obj\Debug\main.o||In function `ZN2sf9TcpSocketD1Ev':|
C:\SFML-2.1\include\SFML\Network\TcpSocket.hpp|46|undefined reference to `_imp___ZTVN2sf9TcpSocketE'|
C:\SFML-2.1\include\SFML\Network\TcpSocket.hpp|46|undefined reference to `_imp___ZN2sf6SocketD2Ev'|
||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
I have the newest version of codeblocks:codeblocks-13.12mingw-setup-TDM-GCC-481.exe
What can I do to run the code?