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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Aiden

Pages: [1]
1
Graphics / Re: Trouble with loadFromFile
« on: December 04, 2013, 10:06:20 pm »
So I reread the tutorial, and sure enough, I had added both the debug and release DLLs to the linker's additional dependencies. I assumed I could add both, and it would work out which one was needed, but I guess not.

So when would I use the non-debug DLLs for the linker? When I want to compile in Release Configuration?

Thanks for the help!!

2
Graphics / Trouble with loadFromFile
« on: December 04, 2013, 08:48:22 pm »
Hi everyone,

I know this question has been answered many times, but I'm still having trouble with getting my program to work correctly.
First the problem: I'm trying to load a texture from the disk into memory
sf::Texture texture;
texture.loadFromFile("image.png");
 

This should be relatively straight forward. However, I'm getting a crash as soon as I get to the second line. Along with the crash, my computer will sometimes beep a bunch, and print garbage to the standard output. If I'm lucky, I will see at the top of the console "Failed to load image 'image.png'", but the reason of failure is not displayed, and garbage is shown instead.


Example:



The directory I printed at the top of the console is just a test I wrote to make sure the current working directory is where I thought it was. I've made sure that the VS project has the working directory set to $(TargetDir) and I've made sure that the image is in the correct location.


In case it's relevant, I'm using Visual Studio 2012.


I've not been able to find a solution, so I hope you guys can help me.


Thanks a bunch!

Pages: [1]