SFML community forums

Help => General => Topic started by: SomeoneClearlyRetarded on March 10, 2019, 09:38:46 am

Title: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: SomeoneClearlyRetarded on March 10, 2019, 09:38:46 am
I don't know if it's just me being retarded, but what ever I try SFML can never load anything for me
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: eXpl0it3r on March 10, 2019, 12:27:46 pm
What's the output on the console?
What's your working directory?
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: SomeoneClearlyRetarded on March 10, 2019, 10:43:36 pm
Just some simple code.Directory Project1 Project1, the code just writes error if it is not able to load texture.
The crazy part is that it works flawlessly on the 32 bit library
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: Lucy2020 on March 11, 2019, 02:19:46 pm
Make sure you do it like this C:\\Users\\ and not C:/Users/
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: SomeoneClearlyRetarded on March 11, 2019, 02:56:13 pm
Nope, still doesn't load
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: Hapax on March 11, 2019, 05:19:10 pm
The DLLs should not be with the source files; they should be next to the executables. For a default setup - for your particular project - they should be in Debug and Release folders inside C:/Users/Master/Desktop/Project1; that's for the 32-bit DLLs. The 64-bit DLLs should be in Debug and Release folders inside C:/Users/Master/Desktop/Project1/x64.
Note that the debug DLLs (with the extra -d) should be in the Debug folders and the release DLLs should be in the Release folders. Of course, the openal32 DLL should be in both debug and release.
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: SomeoneClearlyRetarded on March 12, 2019, 07:04:12 pm
Thanks a lot, that fixes a bunch of the problems. Could have sworn that I tried that before, but it didn't work, eh who knows, I'm dumb. But I'm still confused why only the Release version works, but the Debug version from VS still just doesn't load the file and from the exe asks me for the realease dll's
Title: Re: loadFromFile always returns false (SFML 2.5.1 64-bit)
Post by: bovacu on March 18, 2019, 10:25:48 am
I had this same issue. The first problem was like Hapax said, be carefull where you put your dll's or lib's. The other problem came with the linker, where you put all your sfml-system.lib... or with the -d or/and with -s. I mixed them and in some of them I put .lib and in others .dll, so that caused all my problems, you probably have read this, but here's the documentation for the linker and so:

https://www.sfml-dev.org/tutorials/2.5/start-vc.php

Review the linkers and the options you have put, hope it helps.