Dragonfly Q&A

SFML GraphicsManager issues - can't run Listing 4.83

0 like 0 dislike
I've been trying to debug an error in my code where I can't draw the Rectangle in the GraphicsManager::drawCh() method. Using the debugger, I've narrowed down the issue slightly; when I run the method, the Locals pane says the value for rectangle is:

Information not available, no symbols loaded for sfml-graphics-d-2.dll

I've looked online and it seems to be an issue with linking SFML, but I've copied the .dlls into the project folder as well as the debug folder and nothing has worked.
asked Sep 17, 2016 in Engine Development by jcscheide

1 Answer

0 like 0 dislike
<p>Have you tried listing 4.68?  That's a basic DF "hello, world" without any engine code.

<p>It sounds like the debugger can't provide information on Rectangle - that's not too surprising since I don't think there is pdb available.

<p>Try getting a more basic SFML example (such as 4.68) going - that will help you figure out if it is, indeed, your setup.    The example on page:

<p><a href="http://www.sfml-dev.org/documentation/2.4.0/">http://www.sfml-dev.org/documentation/2.4.0/</a>

<p>or the one on page:

<p><a href="http://www.sfml-dev.org/tutorials/2.4/start-vc.php">http://www.sfml-dev.org/tutorials/2.4/start-vc.php</a>

<p>are all simpler.  Hopefully, that will help you narrow it down.
answered Sep 17, 2016 by claypool
The green circle loads onto my screen no problem. I think it's an issue with the .dll files, but I have no clue where to begin.
So, can you change the green circle to a rectangle?  If so, then try adding a character over the rectangle.  This is essentially the functionality needed in an engine.

If you really think that SFML is the problem, rather than continue to debug, you can try:

1) Re-install SFML.

2) Switch development to the Zoo lab computers (or some other system).

However, given that you can draw a circle, I think it is unlikely an SFML dll problem.
I've fixed it! Turns out the issue was the text and rectangle weren't created as pointers, so there were problems with things not being initialized. Now, I can't get anything to draw whatsoever, though. I don't get any errors, but the program seems to skip right over the p_window->draw() call, even when I click "step into".
More information about Dragonfly can be found on the Dragonfly Home Page.
...