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 - random_canadian

Pages: [1]
1
Graphics / Re: Unhandled Exception Error with Texture
« on: June 12, 2013, 07:51:11 pm »
Update: actually it does work when I include the full C:/... directory :P. So I think it's a problem with the Working Directory. Does anyone know how to fix the Working Directory to load images from the Resource Files folder in the project? (I'm assuming that's where I should put my source images??)

2
Graphics / Re: Unhandled Exception Error with Texture
« on: June 12, 2013, 07:48:10 pm »
I think it's a problem with the way I set up visual studio with SFML. I have problems linking it statically, but I managed to fix some stuff. I got the error to disappear. However, now I am stuck with:
Quote
Failed to load image "image.png". Reason : Unable to open file.
Doesn't even work when include the full C:/ ... directory. Hmm... Now to try and fix this...

3
Graphics / Unhandled Exception Error with Texture
« on: June 12, 2013, 03:26:34 am »
Hello lovely sfml community. First, let me apologize if the question I'm about to ask is considered "stupid." I am fairly new at sfml/c++, having been dabbling in other programming languages in my free time over the past few years. Anyways, I seemed to have stumbled onto a problem. It seems that I cannot load texture images from a file! After finding the source of the problem in my code, I isolated the issue. I removed all other code paths so that only the following code should run, considering it is the main() function. However, the following code does not even work:

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
        sf::Texture texture = sf::Texture();
        texture.loadFromFile("image.png"); //This line is the source of the error. The file "image.png" exists, I assure you.

        return 0;
}

I receive the following (very scary) error:

Quote
Unhandled exception at 0x6CCDDEF8 (msvcr110.dll) in MyGame.exe: 0xC0000005: Access violation reading location 0x00D41000.

Then, Visual Studio directs me to line 367 in the file "memcpy.asm"

        rep     movsd           ;N - move all of our dwords

I honestly have no clue what is going on  :P. I've isolated the issue and don't know where to go from here. Any help is greatly appreciated!

4
DotNet / Re: Where are the System and Networking dlls?
« on: June 06, 2013, 07:19:18 am »
It looks like you're right! Never thought of that, I was so confused about why in the world I didn't have them. I'll look in .NET to find the functionality I need, thanks!

5
DotNet / Where are the System and Networking dlls?
« on: June 06, 2013, 05:47:10 am »
Please forgive me if I'm doing something stupid, but I would really like to use the classes in the SFML-System module lol!  :-\




6
DotNet / Re: C# SFML Visual Studio - Error on Build
« on: June 03, 2013, 07:50:56 pm »
Fair enough  :)
Thanks Laurent.

7
DotNet / C# SFML Visual Studio - Error on Build
« on: June 03, 2013, 03:20:07 am »
Following the steps given on this thread (http://en.sfml-dev.org/forums/index.php?topic=7674.0), I managed to setup SFML.Net 2.0 with Visual Studio C# 2012. However, I get the following error whenever I actually try to build something that references the SFML library...

Quote
An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'sfmlnet-graphics-2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

According to this page (http://msdn.microsoft.com/en-us/library/system.badimageformatexception.aspx), the file image of the sfmlnet-graphics-2 DLL is "invalid."

Quote
The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid.

Any ideas about what I may have done wrong?
Thanks!

EDIT: After some more research it appears this is a problem with discrepancies between x64 or x86 builds (http://en.sfml-dev.org/forums/index.php?topic=9917.0). If I change the CPU settings to "prefer x64" (I am using 64-bit SFML), then the build succeeds. So my question is what happens if my user wants to run the game on a x86 system? Do I need to include DLLs of both x64 and x86 versions of SFML? How do I do this?

EDIT #2: Here's yet another thread about this issue (http://en.sfml-dev.org/forums/index.php?topic=2405.0) but, my question remains. What is the permanent solution?

Pages: [1]
anything