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

Author Topic: 'string' file not found.  (Read 11060 times)

0 Members and 1 Guest are viewing this topic.

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
'string' file not found.
« on: July 30, 2013, 07:53:00 am »
Hey there SFML community, it's been a while since I've made a thread here and during this time of absence I've obtained a new computer which I'm having trouble setting up so I can develop in C++ using SFML.

Like usual, I feel ridiculous asking questions because I know they're simple yet I can't figure them out (being a noob at this stuff and all)

So basically my problem is that when I compile the default SFML 2.1 project I get an error "'string' file not found" and I'm not even able to #include <iostream> without getting a similar error. I'm using a Mac running the latest version of Mac OSX and I have the latest Xcode installed yet it seems like I'm not even able to compile basic C++ programs, help? :)

Thanks,

MarcuzPwnz.
« Last Edit: July 30, 2013, 07:55:37 am by MarcuzPwnz »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: 'string' file not found.
« Reply #1 on: July 30, 2013, 08:31:18 am »
Make sure that your file is compiled as C++, not as C (most IDEs deduce the language from the file extension).

Are you able to include C headers, like <stdio.h>?
Laurent Gomila - SFML developer

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: 'string' file not found.
« Reply #2 on: July 30, 2013, 08:53:36 am »
I would assume I'm compiling as C++ as I'm using a .cpp file and my language settings on the IDE look like this

And I am unable to include <stdio.h> also.

Thank you for the reply. :)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: 'string' file not found.
« Reply #3 on: July 30, 2013, 08:56:58 am »
Do you have a custom version of clang installed on your system? (I had this issue yesterday.)
SFML / OS X developer

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: 'string' file not found.
« Reply #4 on: July 30, 2013, 08:58:12 am »
I'm using the default compiler supplied with the installation of Xcode from the app store. :)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: 'string' file not found.
« Reply #5 on: July 30, 2013, 09:01:06 am »
so when you run which clang in a terminal you get /usr/bin/clang, right? (just to make sure)
SFML / OS X developer

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: 'string' file not found.
« Reply #6 on: July 30, 2013, 09:02:52 am »
I can't even run clang as a command in terminal, this is obviously a problem.

Is is possible Xcode didn't even install a compiler?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: 'string' file not found.
« Reply #7 on: July 30, 2013, 09:17:06 am »
I'm not 100% sure that the issue but you can try installing the CLT. See this SO
SFML / OS X developer

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: 'string' file not found.
« Reply #8 on: July 30, 2013, 09:21:57 am »
I just managed to compile a basic command line application using Xcode so I'm assuming that's not the issue. :P

Just clicked your link, I do remember installing the CLT on my last Macbook, I'll give this a try now, thanks. :)

Edit: Installed and now I'm getting the following Apple Mach-O-Linker errors.

« Last Edit: July 30, 2013, 04:15:35 pm by MarcuzPwnz »

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: 'string' file not found.
« Reply #9 on: July 31, 2013, 12:44:02 pm »
Does anybody have an idea or solution as to what may be causing this issue or how to fix it? :)

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: 'string' file not found.
« Reply #10 on: July 31, 2013, 01:05:42 pm »
Does anybody have an idea or solution as to what may be causing this issue or how to fix it? :)

For starters, what about try reading what your error is? The very first error in your list is...
Quote
Directory not found for option '-L/usr/local/lib'

That means your linker can not find your lib folder, so that would be something to check that your have the correct path in there to the SFML libraries.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: 'string' file not found.
« Reply #11 on: July 31, 2013, 01:07:31 pm »
It's in red. But people don't read red, apparently.. http://www.sfml-dev.org/tutorials/2.1/start-osx.php
SFML / OS X developer

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: 'string' file not found.
« Reply #12 on: August 01, 2013, 05:32:26 am »
Managed to fix it, thank you for pointing me in the right direction and I apologise for being troublesome and not reading through everything as I should have first.