SFML community forums

Help => General => Topic started by: ninjaboyangel on May 05, 2015, 03:33:16 am

Title: [SOLVED] "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 05, 2015, 03:33:16 am
I am just getting started on SFML in Visual Studio 2013, and when i was following the tutorial to create the SFML Works executable, I am receiving countless errors, and after trying to no avail, i cannot find a solution anywhere on the forums.
Here is my build log with the error.
(click to show/hide)
I have tried some solutions to other users with similar problems, one of them being to make sure that when static linking you have the "-s" and "-d". This didn't help so now i came to ask help from you. I appreciate the help in advance!
Title: AW: "47 Unresolved Externals" Error when compiling.
Post by: eXpl0it3r on May 05, 2015, 08:15:26 am
You didn't spend much time searching, right?
Because there are countless threads with the same "issue".

If you had followed the official 2.2 tutorial, you also have gotten to the point where it's explained that when linking statically you need to link SFML's dependencies as well. Go read that paragraph again. ;)
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 05, 2015, 03:12:38 pm
I read that part. I already have statically linked the dependencies, that's the problem. Mabye they are seperated wrong, but i listed them. Here is a screenshot of it. Thats is why i posted here :P  because i honestly spent time and like i said, most solutions  haven't worked. i thoroughly read the tutorial and i know i didn't miss anything
http://imgur.com/hzBlfPY (Heres the link if below doesnt work)
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 05, 2015, 04:55:16 pm
Sfml static is defined, and do i need every single lib to be listed or can I just use graphics window and system and their dependencies? Also which ones am I missing as it seems I have the right ones.
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: Nexus on May 05, 2015, 05:00:05 pm
Sorry I just noticed I was wrong, that's why I removed my post ;)

Yes, you only have to link the libraries on which the SFML modules you use depend. Did you make sure you built SFML for exactly the same compiler (including the same version and configuration)? Or use the official binary of the same compiler?

Otherwise, you could try a newer SFML version from GitHub. Note that some dependencies have changed (there is no more GLEW).
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 05, 2015, 05:15:11 pm
I got sfml from the download section on the website  (v2.2) for Windows x32 for visual studio 2013. Would I need to get it from github in this case? and where can I find the updated dependencies?

Edit: on the 2.2 tutorial it lists glew as one of the libs I need, so is 2.2 not the newest? I'm using 2.2 right now.
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: eXpl0it3r on May 05, 2015, 07:18:55 pm
I'm sorry if my post felt rude. Since you didn't provide much information and the errors show that some libraries aren't linked, plus the fact that it's something that gets overlooked at least once a week by someone, I thought it was helpful enough to point at the specific paragraph again.

It seems like the "inherited" libraries don't get linked properly. Could you provide the verbose output (http://www.sfml-dev.org/faq.php#tr-grl-verbose-ide) of the build command? Make sure to do a full rebuild!
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 05, 2015, 07:28:29 pm
Its fine man, sorry for not providing a bunch of information, i'm pretty new to this and didn't know what to provide.  I understand what you mean about people overlooking stuff, its no biggie. I will provide the verbose output when i get home, as i am at work right now. And is there a special button to do a full rebuild other than the build button? Thanks in advance! Also i think part of my problem like nexus said, is I may need to re-download sfml and get it from GitHub since i included GLEW in my dependencies(which it says to do in the tutorial) but according to him it was changed to not be needed? Any clarification on this matter?
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: Nexus on May 05, 2015, 07:33:13 pm
And is there a special button to do a full rebuild other than the build button? Thanks in advance!
Menu Build > Rebuild solution (or similar, I don't have the English version). Alternately Ctrl+Alt+F7.

Also i think part of my problem like nexus said, is I may need to re-download sfml and get it from GitHub since i included GLEW in my dependencies(which it says to do in the tutorial) but according to him it was changed to not be needed? Any clarification on this matter?
Your configuration should actually work, it's not that you have to re-download SFML. It is just sometimes easier to reinstall everything than wasting hours of searching... and switching to a newer version isn't a bad idea anyway ;)
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 05, 2015, 07:35:56 pm
Thanks! Also if i don't do a full rebuild, will it not fix the error even if i actually fix it?? Meaning i could have solved my problem already and not even know it?
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: Nexus on May 05, 2015, 07:49:35 pm
The IDE should be smart enough to update the relevant parts when you do a partial rebuild. The full rebuild is needed so that we get the complete output of the verbose log.
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 06, 2015, 12:08:43 am
What is the latest version? i have 2.2, not sure if that is latest or not (pretty sure it is).
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 06, 2015, 12:14:56 am
Here is the Verbose Output you asked for
(click to show/hide)
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 06, 2015, 07:48:15 pm
Any ideas now that you have the verbose output?
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 07, 2015, 02:44:53 am
You guys have any ideas to what the problem is now?
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: eXpl0it3r on May 07, 2015, 03:27:49 am
As I said the libs listed as "inherited" in one of your screenshots aren't getting linked. No idea what you did exactly, but if you do what the official tutorial says it will work.
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 07, 2015, 03:28:58 am
Oh okay thanks, I'll try that.
Title: Re: "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 07, 2015, 11:59:47 pm
It works now. I got another error about _WinMain@16 but i found inline that i need to add "/ENTRY:"wWinMainCRTStartup" to Properties -> Linker -> Command Line. Thanks for your help!
Title: Re: [SOLVED] "47 Unresolved Externals" Error when compiling.
Post by: Nexus on May 08, 2015, 12:28:25 am
Or link to sfml-main...
Title: Re: [SOLVED] "47 Unresolved Externals" Error when compiling.
Post by: ninjaboyangel on May 08, 2015, 01:35:27 am
I already had, it just wasn't working