SFML community forums

Help => Network => Topic started by: MillionthVector on December 12, 2012, 05:42:53 pm

Title: Network module, undefined reference[Solved]
Post by: MillionthVector 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.
Title: Re: Network module, undefined referance
Post by: Nexus on December 12, 2012, 05:46:02 pm
What libraries have you linked to?

What configuration (debug/release, dynamic/static) do you use?
Title: Re: Network module, undefined referance
Post by: MillionthVector 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.
Title: Re: Network module, undefined referance
Post by: Nexus 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.
Title: Re: Network module, undefined referance
Post by: MillionthVector 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.
Title: Re: Network module, undefined referance
Post by: Nexus 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 ;)
Title: Re: Network module, undefined referance
Post by: MillionthVector on December 12, 2012, 10:55:25 pm
Okay, did it and now it works, thanks a ton! ;D