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

Author Topic: Can't seem to install SFML  (Read 22175 times)

0 Members and 1 Guest are viewing this topic.

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #30 on: March 20, 2014, 09:19:27 pm »
wait, what do you mean by save all? I checked the .zip that contained everything, and everything is there

I just tried to download my own file, it works .-.
« Last Edit: March 20, 2014, 09:58:28 pm by greenleaf800073 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
AW: Can't seem to install SFML
« Reply #31 on: March 20, 2014, 09:58:49 pm »
There's no purpose in attaching the same thing three times.

The project file you posted is an XML file (see above) and it has no information of the libraries, so either you didn't add them or you forgot to save the project file itself (doesn't happen with Ctrl+s). To guarantee the saving of the project file you can choose to "Save All".
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #32 on: March 20, 2014, 10:06:03 pm »
Ok, I've clicked 'save all files'

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #33 on: March 20, 2014, 11:23:02 pm »
Well something changed, but nothing in the project file.
What happens if you close Code::Blocks and reload the project, because I've no idea why you say the settings are there even though they aren't in the project file. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #34 on: March 20, 2014, 11:54:13 pm »
Oh, it asked me to save .-. that's so weird, why can't I do that when inside the compiler, I think it added a .layout


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #35 on: March 21, 2014, 12:17:03 am »
Maybe "Save all projects" would've done it as well, you know one needs to be flexible and innovative. ;)

Anyways, now we get the settings...

#include "C:\Users\cocon_000\Desktop\SFML-2.1\include\SFML\Graphics.hpp"
Don't do that. You add the include directory to the compiler, thus the compiler knows where to look for the header if you do it like this:
#include <SFML/Graphics.hpp>

Also make sure whenever you change something in the linking settings to do a full rebuild.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #36 on: March 21, 2014, 12:57:43 am »
Oh yea, I forgot to change that back to #include <SFML\Graphics.hpp>

It was originally that ^ but then it still didn't work, so then I changed it to #include "..."

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Can't seem to install SFML
« Reply #37 on: March 21, 2014, 09:55:02 am »
And use forward slashes for paths, they're portable.
#include <SFML/Graphics.hpp>

I don't even know why people came to the idea of using \ for #include. Not even the bad books teach that...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #38 on: March 21, 2014, 12:48:07 pm »
And use forward slashes for paths, they're portable.
#include <SFML/Graphics.hpp>

I don't even know why people came to the idea of using \ for #include. Not even the bad books teach that...

? \ are for computer paths, what are portable paths?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #39 on: March 21, 2014, 01:08:36 pm »
Back-slashes are used by Windows (only) for paths. All Unix based systems (Linux, OS X, etc) use forward-slashes. C++ uses back-slashes as escape character (e.g. \n = new line, \t = tab, etc) and it understand forward-slashes for all kind of paths just fine, thus you should never use back-slashes for paths in C++.

"Portable" means that it can be used on any system.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Can't seem to install SFML
« Reply #40 on: March 21, 2014, 04:26:12 pm »
And use forward slashes for paths, they're portable.
#include <SFML/Graphics.hpp>

I don't even know why people came to the idea of using \ for #include. Not even the bad books teach that...
That's the default for VS, at least 2010. There is an option to never use backslash too.
https://connect.microsoft.com/VisualStudio/feedback/details/499097/c-header-completion-should-use-forward-slashes-not-backslashes
http://support.wholetomato.com/default.asp?W337
« Last Edit: March 21, 2014, 04:28:21 pm by FRex »
Back to C++ gamedev with SFML in May 2023

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #41 on: March 21, 2014, 11:17:49 pm »
oh ok, I get it now :)

well, can you guys help me though?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #42 on: March 21, 2014, 11:33:57 pm »
All I got what I already said, because it works totally fine on my end. :)

Also make sure whenever you change something in the linking settings to do a full rebuild.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #43 on: March 21, 2014, 11:35:06 pm »
Should I have relative paths or direct paths?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #44 on: March 22, 2014, 09:12:50 am »
Well the question is for what exactly, but in the end it doesn't really matter.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/