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

Pages: [1]
1
Graphics / Re: Unhandled Exception when loading a font
« on: November 22, 2015, 08:21:44 pm »
its possible, i got a bit confused when downloading sfml. ive got other stuff working though so i'm not sure whats wrong

2
Graphics / Unhandled Exception when loading a font
« on: November 22, 2015, 06:03:56 pm »
I've been trying to load a font into one of my projects but I keep getting an unhandled exception. Im using visual studio 2013.

error message:
Unhandled exception at 0x639FF20C (msvcr120.dll) in Project1.exe: 0xC0000005: Access violation reading location 0x00924000.

#include <SFML\Graphics.hpp>

using namespace sf;

int main()
{
        RenderWindow window(sf::VideoMode(800, 600), "test");

        Font myFont;

        myFont.loadFromFile("arial.ttf");

        Text myText;

        myText.setFont(myFont);
        myText.setString("Test");

        while (window.isOpen())
        {
                sf::Event event;

                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed) window.close();
                }
        }

}

Pages: [1]