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

Author Topic: Setting up SFML  (Read 2413 times)

0 Members and 1 Guest are viewing this topic.

Dark Goomba

  • Newbie
  • *
  • Posts: 9
    • View Profile
Setting up SFML
« on: January 28, 2014, 04:36:20 am »
Hello everyone!

I'm quite new to sfml 2.1 but I can't manage to even pass the first step: the set up. I went through the installation instructions almost ten times but when I run my program on visual studio 2010 I get these warnings:

C:\...\NewProject\Debug\sfml-system-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-window-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-network-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-graphics-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-audio-d-2.dll', Cannot find or open the PDB file

I put my working directory to C:\...\NewProject\Debug so I thought that might work but it didn't.
I know there's probably something I did wrong or I'm just bad with dlls
Either way, any help is appreciated! :)
Goombas are mushrooms.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Setting up SFML
« Reply #1 on: January 28, 2014, 04:53:12 am »
Those warnings are fine to ignore as long as you have SFML setup correctly  ;) You only need those files if you plan on debugging SFML (and in that case you would be building SFML from source).

However I would recommend you upgrade to at least Visual Studio 2012 if not 2013 to take advantage of C++11.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Dark Goomba

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Setting up SFML
« Reply #2 on: January 28, 2014, 05:12:36 am »
Thanks for the help.
I was using sf::Texture, Texture.loadFromFile() but it seemed to not work. So I guess the installation wasn't the cause in this case. Anyways, I put Picture.png in the same folder as main.cpp but it displayed this: "Failed to load image "Picture.png" Reason : Unable to open file" Is there any way to fix this?
Goombas are mushrooms.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Setting up SFML
« Reply #3 on: January 28, 2014, 08:20:27 am »
Resources get loaded relative to the working directory. With VS the default workung directory is where the project file is located. But you can always change it in the options.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Dark Goomba

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Setting up SFML
« Reply #4 on: January 29, 2014, 04:40:00 am »
Ok, I spent some time to check everything. The working directory is set to the same location as the project file. The picture name is spelled right, it is a png, and it's in the correct location. I'm not sure what I did wrong.

Edit: Solved!! I called the picture "Picture.png" and I changed it to just "Picture" and it worked! Well anyways, thanks to everyone above for the useful info on working directories!  ;)
« Last Edit: January 29, 2014, 04:51:55 am by Dark Goomba »
Goombas are mushrooms.

 

anything