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

Author Topic: Resolved, thank you everyone that helped  (Read 6802 times)

0 Members and 4 Guests are viewing this topic.

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Resolved, thank you everyone that helped
« on: April 20, 2016, 01:38:38 am »
So I just finished an online course on C++ programming, and I want to make something. Not sure what yet, just something small. I found SFML and it seems like a pretty good option for beginners. However, once I finished setting it up on Xcode, and try running the basic sprites it comes with, I get two errors in main.cpp: the first, it does not find the SFML/Graphics.hpp file, but does find the SFML/Audio.hpp file, which is odd. I found the file just by typing it into Finder, but the project cannot. It also can't seem to find a few identifiers in some portions of the code. If someone could help me, I'd be very grateful; although it probably is pretty basic.
« Last Edit: April 28, 2016, 08:23:10 pm by HeavenBuilder »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: A basic noob problem I'm having (mac)
« Reply #1 on: April 20, 2016, 07:43:24 am »
Did you follow the official tutorial on setting up Xcode? Did you properly install the framework?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A basic noob problem I'm having (mac)
« Reply #2 on: April 21, 2016, 02:42:10 pm »
(click to show/hide)

I have done all of these. frameworks and extlibs in a Frameworks folder inside Library, and templates inside Xcode/Templates. It's not finding files, and because of functions and identifiers created in those files, the SFML project can't run. Is it even supposed to run right off the bat when I'm done installing, or does it require tweaking first? Or do I just have to wait till I buy a windows computer eventually... :-\

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: A basic noob problem I'm having (mac)
« Reply #3 on: April 21, 2016, 03:32:50 pm »
If it can't find SFML/Graphics.hpp but finds SFML/Audio.hpp, then you probably have messed up the install. Maybe try again from a clean state (i.e. remove everything first).
SFML / OS X developer

USA

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: A basic noob problem I'm having (mac)
« Reply #4 on: April 21, 2016, 03:50:21 pm »
Can Mac's run Codeblocks? Because installing SFML on codeblocks is easier.

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: AW: A basic noob problem I'm having (mac)
« Reply #5 on: April 25, 2016, 01:56:06 am »
Did you follow the official tutorial on setting up Xcode? Did you properly install the framework?
Did it twice.

If it can't find SFML/Graphics.hpp but finds SFML/Audio.hpp, then you probably have messed up the install. Maybe try again from a clean state (i.e. remove everything first).
Did that; Figured out it can't find any of them, but for some reason it only says so if #include graphics is before include audio, and vice-versa.

Can Mac's run Codeblocks? Because installing SFML on codeblocks is easier.
Sadly, no  >:(


Dunno what to do guys  :-\

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: A basic noob problem I'm having (mac)
« Reply #6 on: April 25, 2016, 09:37:20 am »
I'm sorry to say that, but you must have done something wrong when installing SFML or setting up your project.

Remove everything you've installed for SFML, and when following the tutorial again, write down everything you do to modify your system + create your project, and then report it here (if it still doesn't work, of course). That way we can pinpoint exactly what went wrong.
SFML / OS X developer

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A basic noob problem I'm having (mac)
« Reply #7 on: April 26, 2016, 12:56:02 am »
Step 1: installed SFML through the mac download page

Step 2: copied the contents of Frameworks into a folder I just created called Frameworks, which is located in Library

Step 3: copied the contents of extlibs to the previous folder called Frameworks

Step 4: copied the SFML file located inside templates to a new folder I created called Templates, which is located inside Library/Developer/Xcode

Step 5: run the program

Step 6: rage at the same error message, throw your computer out the window, and shout "I'm done!"

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: A basic noob problem I'm having (mac)
« Reply #8 on: April 26, 2016, 10:05:02 am »
This seems correct but I've two doubts.

1) when you say "Library", do you mean /Library (i.e. at the root of the partition) or /Users/<you>/Library, or something else? (The former being the expected one.)

2) in step 5, did you create a fresh project or used the previous one? Try a fresh one and make sure to select "framework" in the template wizard for SFML (CLT or App).
SFML / OS X developer

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A basic noob problem I'm having (mac)
« Reply #9 on: April 27, 2016, 01:12:10 am »
I mean Users, yeah. In step 5 yes, I wiped the project and made a new one every time I re-installed SFML

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A basic noob problem I'm having (mac)
« Reply #10 on: April 27, 2016, 01:17:09 am »
*chose framework App

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: A basic noob problem I'm having (mac)
« Reply #11 on: April 27, 2016, 08:50:23 am »
I mean Users, yeah.
No, not "yeah". The tutorial specifically mention the one at the root of the system for a reason.
SFML / OS X developer

HeavenBuilder

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SFML installation problem on Xcode (mac)
« Reply #12 on: April 28, 2016, 08:22:24 pm »
Oops sorry, english isn't my first language. Thank you very much, I've managed to make it work :D Sorry for all of the trouble, I'm still trying to get the hang of all this, had no idea two library folders even existed. Thanks once again

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Resolved, thank you everyone that helped
« Reply #13 on: April 28, 2016, 08:56:56 pm »
No problem, have fun!
SFML / OS X developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Resolved, thank you everyone that helped
« Reply #14 on: April 28, 2016, 10:09:37 pm »
Renaming the topic like that is really a bad idea you know ;)

(not that the original title was brilliant, but still :P)
Laurent Gomila - SFML developer