SFML community forums

Help => General => Topic started by: HeavenBuilder on April 20, 2016, 01:38:38 am

Title: Resolved, thank you everyone that helped
Post by: HeavenBuilder 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.
Title: AW: A basic noob problem I'm having (mac)
Post by: eXpl0it3r on April 20, 2016, 07:43:24 am
Did you follow the official tutorial on setting up Xcode? Did you properly install the framework?
Title: Re: A basic noob problem I'm having (mac)
Post by: HeavenBuilder 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... :-\
Title: Re: A basic noob problem I'm having (mac)
Post by: Hiura 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).
Title: Re: A basic noob problem I'm having (mac)
Post by: USA on April 21, 2016, 03:50:21 pm
Can Mac's run Codeblocks? Because installing SFML on codeblocks is easier.
Title: Re: AW: A basic noob problem I'm having (mac)
Post by: HeavenBuilder 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  :-\
Title: Re: A basic noob problem I'm having (mac)
Post by: Hiura 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.
Title: Re: A basic noob problem I'm having (mac)
Post by: HeavenBuilder 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!"
Title: Re: A basic noob problem I'm having (mac)
Post by: Hiura 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).
Title: Re: A basic noob problem I'm having (mac)
Post by: HeavenBuilder 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
Title: Re: A basic noob problem I'm having (mac)
Post by: HeavenBuilder on April 27, 2016, 01:17:09 am
*chose framework App
Title: Re: A basic noob problem I'm having (mac)
Post by: Hiura 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.
Title: Re: SFML installation problem on Xcode (mac)
Post by: HeavenBuilder 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
Title: Re: Resolved, thank you everyone that helped
Post by: Hiura on April 28, 2016, 08:56:56 pm
No problem, have fun!
Title: Re: Resolved, thank you everyone that helped
Post by: Laurent 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)