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

Author Topic: Network module, undefined reference[Solved]  (Read 3207 times)

0 Members and 1 Guest are viewing this topic.

MillionthVector

  • Newbie
  • *
  • Posts: 6
    • View Profile
Network module, undefined reference[Solved]
« on: December 12, 2012, 05:42:53 pm »
The other modules I've tried seem to work, but when I try to use the network module I keep getting undefined reference errors, for example:

#include <SFML/Network.hpp>
int main()
{
    sf::IPAddress Address1;
    return EXIT_SUCCESS;
}
gives this error:

"""

obj\Debug\main.o||In function `main':|
C:\Documents and Settings\User\My Documents\testthing\main.cpp|5|undefined reference to `sf::IPAddress::IPAddress()'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 1 seconds) ===|

"""
OS: WindowsXP
Intel GMA 950 integrated
SFML 1.6

It happens when I try to use other parts of the module as well, I started using SFML last Saturday so it could be something simple, dunno :(.

Thank you very much for any help.
« Last Edit: December 12, 2012, 10:59:59 pm by Laurent »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Network module, undefined referance
« Reply #1 on: December 12, 2012, 05:46:02 pm »
What libraries have you linked to?

What configuration (debug/release, dynamic/static) do you use?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

MillionthVector

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Network module, undefined referance
« Reply #2 on: December 12, 2012, 05:55:36 pm »
I use debug/release, and have used Window and Graphics successfully.
The only library I'm using is SFML.
« Last Edit: December 12, 2012, 06:02:55 pm by MillionthVector »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Network module, undefined referance
« Reply #3 on: December 12, 2012, 06:18:56 pm »
I use debug/release, and have used Window and Graphics successfully.
What is your current configuration? Debug or release? Do you link SFML dynamically or statically? Choose one configuration that doesn't work.

The only library I'm using is SFML.
You misunderstood, I'd like to know what you specified in your linker. Which libraries you exactly specified. Just copy&paste the entries.

By the way, you could also try SFML 2.0, especially when you are beginning. It offers much more features, less bugs and is still in development -- in contrast to 1.x, which hasn't been maintained for years.
« Last Edit: December 12, 2012, 06:20:59 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

MillionthVector

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Network module, undefined referance
« Reply #4 on: December 12, 2012, 06:33:08 pm »
Oh, sorry, I'm using debug.

I don't have anything in the linker settings, I chose SFML project when I started the new project.

Thanks :D.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Network module, undefined referance
« Reply #5 on: December 12, 2012, 06:56:03 pm »
As stated, download SFML 2 RC. Then you can read the installation tutorial and follow it step by step ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

MillionthVector

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Network module, undefined referance
« Reply #6 on: December 12, 2012, 10:55:25 pm »
Okay, did it and now it works, thanks a ton! ;D

 

anything