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

Pages: [1]
1
Graphics / Unable to load font from file
« on: December 29, 2010, 05:56:28 pm »
Code: [Select]
Unable to start program '...sfml-audio.lib'
The system cannot find the file specified.


I removed the full location, but it might be faulty because in the vc2008 folder, the next folders in the path are .. and .. (so it's ...vc2008\..\..\Temp\vc2008\sfml-audio\Debug DLL\sfml-audio.lib). AFAIK, there isn't a .. folder in the vc2008 folder...

2
Graphics / Unable to load font from file
« on: December 29, 2010, 04:32:53 pm »
This is such a hassle. I'm trying to rebuild it but it keeps saying that it can't find the audio library.

3
Graphics / Unable to load font from file
« on: December 29, 2010, 03:54:08 pm »
I'm using VS2010. arial.ttf is in the same directory as my executable.

4
Graphics / Unable to load font from file
« on: December 29, 2010, 03:06:35 pm »
At first, an error would pop up in the console window saying that the font file couldn't be found (with a run time error), but now I'm just getting run time errors:
Code: [Select]
Unhandled exception at 0x757b9617 in sfml-test.exe: Microsoft C++ exception: std::length_error at memory location 0x0031f3f0..

My code looks like this:
Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
sf::Font MyFont;
MyFont.LoadFromFile("arial.ttf");
sf::RenderWindow App(sf::VideoMode(800,600,32), "test");
sf::Event Event;
sf::Shape box = sf::Shape::Rectangle(0, 0, 50, 50, sf::Color(100, 100, 100));
box.SetPosition(100,100);
while(App.IsOpened())
{
while(App.GetEvent(Event))
{
if(Event.Type == Event.Closed) App.Close();
}
App.Clear(sf::Color(100, 149, 237));
App.Draw(box);
App.Display();
}
return EXIT_SUCCESS;
}


How can I fix this?

EDIT: If I use if (!MyFont.Load...) return EXIT_SUCCESS;, the same thing. I'm not sure what's going wrong. I put arial.ttf in the same directory as the executable, the libraries, etc... I even put it in the resource folder in the project and it doesn't work.

5
Window / Unhandled exception at 0x759a9f11 in sfml-test.exe
« on: December 29, 2010, 03:04:01 pm »
SFML.sln only has the sfml- projects, so I'm pretty sure I've already compiled everything...

It seems to be working now.

6
Window / Unhandled exception at 0x759a9f11 in sfml-test.exe
« on: December 29, 2010, 01:21:51 am »
Hello. I'm new to SFML. I'm trying to use Window to create a simple window as a test. Here's my code:

Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>

int main(int argc, char** argv)
{
    sf::Window App(sf::VideoMode(800, 600, 32), "test");
    return 0;
}


It compiles just fine, I've linked the -d lib files (it's compiling in Debug Win32 mode), and I even got it to work earlier (a window would appear for a second but then it would crash). I do NOT have any dll files in any of the project folders (not sure where they should go, anyway - the instructions in the tutorial are ambiguous as there are many sets of Release and Debug folders in the project folder). Also, earlier, when the window popped up, there were no dlls in the project folder.

I get the following run-time error: Unhandled exception at 0x759a9f11 in sfml-test.exe: 0xC0000005: Access violation reading location 0xcccccc00. It points to line 7 (sf:: Window App...). I'd like some help. Thanks in advance.

P.S. I'm using VS 2010. I'm basically getting the same error this guy is: http://www.sfml-dev.org/forum/viewtopic.php?t=3152&sid=46ad47e735ac133493ab73e5f4540f4b
Also, the clock program worked, and iirc, I compiled the source for VS 2010, so that shouldn't be a problem.

Could I be missing something from the SFML-1.6 or lib/vc2010 folder? I don't think I am... Do I have to put the dlls in the project folder?

EDIT: I put the DLLs in the project folder, and it's working with the Release version (I'll try the Debug version later). However, I'm now getting a buffer overrun error:

Code: [Select]
A buffer overrun has occurred in sfml-test.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.

For more details please see Help topic 'How to debug Buffer Overrun Issues'.

Pages: [1]