Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sfml Network module fails to link. (Linker Errors)  (Read 3476 times)

0 Members and 1 Guest are viewing this topic.

Overkiller

  • Newbie
  • *
  • Posts: 8
    • View Profile
Sfml Network module fails to link. (Linker Errors)
« on: September 08, 2013, 08:11:56 pm »
Hi, it's me again :)

The problem is, that my IDE (VS 2012), throws linker errors. All of these are from SFML Network module. I have set everything from tutorial on site. Is there any way to repair this?

Images are in attachments.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Sfml Network module fails to link. (Linker Errors)
« Reply #1 on: September 08, 2013, 08:35:38 pm »
Make sure that you don't mix architectures (32/64 bits) or compiler versions.
Laurent Gomila - SFML developer

Overkiller

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Sfml Network module fails to link. (Linker Errors)
« Reply #2 on: September 08, 2013, 08:42:30 pm »
Thank you for reply.

Compiler version is okay for 100%, because it is my second project and i think that my architecture is okay, because i'm using 64 bit VS 2012.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Overkiller

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Sfml Network module fails to link. (Linker Errors)
« Reply #4 on: September 08, 2013, 08:52:50 pm »
Here you are:
1>------ Build started: Project: ConsoleApplication2, Configuration: Debug Win32 ------
1>  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x86
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  cl /c /I"C:\SFML-2.0\include" /ZI /nologo- /W3 /WX- /sdl /Od /Oy- /D SFML_DYNAMIC /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt client.cpp Source.cpp
1>cl : Command line warning D9035: option 'nologo-' has been deprecated and will be removed in a future release
1>  
1>  Skipping... (no relevant changes detected)
1>  Source.cpp
1>  client.cpp
1>  Microsoft (R) Incremental Linker Version 11.00.60610.1
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  "/OUT:F:\Programowanie\ConsoleApplication2\Debug\ConsoleApplication2.exe" /INCREMENTAL "/LIBPATH:C:\SFML-2.0\lib" "sfml-audio-d.lib" "sfml-graphics-d.lib" "sfml-main-d.lib" "sfml-network-d.lib" "sfml-system-d.lib" "sfml-window-d.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG "/PDB:F:\Programowanie\ConsoleApplication2\Debug\ConsoleApplication2.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:F:\Programowanie\ConsoleApplication2\Debug\ConsoleApplication2.lib" /MACHINE:X86 Debug\client.obj
1>  Debug\Source.obj
1>client.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::UdpSocket::UdpSocket(void)" (__imp_??0UdpSocket@sf@@QAE@XZ) referenced in function "public: __thiscall client::client(void)" (??0client@@QAE@XZ)
1>client.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum sf::Socket::Status __thiscall sf::UdpSocket::bind(unsigned short)" (__imp_?bind@UdpSocket@sf@@QAE?AW4Status@Socket@2@G@Z) referenced in function "public: bool __thiscall client::bindSocket(void)" (?bindSocket@client@@QAE_NXZ)
1>client.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::UdpSocket::~UdpSocket(void)" (__imp_??1UdpSocket@sf@@UAE@XZ) referenced in function "public: __thiscall client::~client(void)" (??1client@@QAE@XZ)
1>F:\Programowanie\ConsoleApplication2\Debug\ConsoleApplication2.exe : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Sfml Network module fails to link. (Linker Errors)
« Reply #5 on: September 08, 2013, 09:28:30 pm »
Compiler version is okay for 100%, because it is my second project and i think that my architecture is okay, because i'm using 64 bit VS 2012.
/MACHINE:X86 means you are linking in 32-bit mode... This is the default even in a 64-bit capable IDE. Are you also using the 32-bit version of SFML? If you want, you can try changing it to /MACHINE:X64 and seeing if that works...
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything