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

Author Topic: Started new template in xCode and got 'string' file not found  (Read 5688 times)

0 Members and 1 Guest are viewing this topic.

rorlick

  • Newbie
  • *
  • Posts: 7
    • View Profile
did everything in the install step(using the downloads, did not build it myself.  without changing anything, when I run it ResourcePath.hpp gives me

"Lexical or Preprocessor Issue 'string' file not found

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #1 on: May 01, 2013, 11:02:39 am »
there must be something else wrong. try a clean build and give us as much details you can.
SFML / OS X developer

rorlick

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Started new template in xCode and got 'string' file not found
« Reply #2 on: May 01, 2013, 05:06:30 pm »
Ok well I reinstalled everything, and it is doing the same thing but now its telling me this(may have been saying it before and I missed it):
"
warning: The specified SDK “Current OS X” does not appear to have all of the necessary headers installed.  Update your project to use a built-in SDK (“Latest OS X” is recommended) or install the system headers (included with the “Command Line Tools” package) from the “Downloads” pane in the Xcode preferences."

I'm following those instructions now and I'll report back, just not sure why it wouldnt have done this when I was using the RC.

rorlick

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Started new template in xCode and got 'string' file not found
« Reply #3 on: May 02, 2013, 07:55:35 pm »
Ok so the one error is gone after the update but now I have:

Undefined symbols for architecture x86_64:
  "sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned int, sf::ContextSettings const&)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I don't even know where to start on these, damn

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #4 on: May 02, 2013, 08:08:46 pm »
There's no such function in 2.0. The constructor takes a sf::String for the title. So you probably didn't remove the header of the RC version from your computer.

SFML / OS X developer

rorlick

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Started new template in xCode and got 'string' file not found
« Reply #5 on: May 02, 2013, 08:14:00 pm »
There's no such function in 2.0. The constructor takes a sf::String for the title. So you probably didn't remove the header of the RC version from your computer.

Ok that makes sense.  I tried to delete everything I was replacing when I installed it, where would the header be?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #6 on: May 02, 2013, 08:24:19 pm »
Headers can be in /usr/local/include, or in a framework in /Library/Frameworks, or any similar directories. If you didn't find them, you can still use `find / -name SFML` to search your whole computer for them.
SFML / OS X developer

Raphman

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #7 on: May 02, 2013, 08:33:12 pm »
Sorry to change the subject a bit, but does this also apply to the windows version of SFML,that is taking an SF::String rather than a std::sting for a render window? I just upgraded to 2.0 and I didn't run into that issue (still passing in a std::string in the constructor).

I was wondering if I missed anything too since I just copy/pasted the new SFML directory over my RC one ( and changed the necessary paths in VS).

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #8 on: May 02, 2013, 08:36:20 pm »
If you successfully replaced your old installation then everything is fine.

Note that you still can build a RenderWindow with a std::string because a sf::String can be implicitly constructed from that string. The error that rorlick has is because the compiler thinks there is another constructor that doesn't need this implicit conversion.
SFML / OS X developer

Raphman

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #9 on: May 02, 2013, 08:37:48 pm »
Ah alright, thanks.Sorry to hijack the thread :)

rorlick

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Started new template in xCode and got 'string' file not found
« Reply #10 on: May 02, 2013, 09:00:37 pm »
Headers can be in /usr/local/include, or in a framework in /Library/Frameworks, or any similar directories. If you didn't find them, you can still use `find / -name SFML` to search your whole computer for them.

I installed SFML by copying the folders to the Frameworks file so I assume that was it.  I just reinstalled and got the same error, is it possible it is just a problem with the code in the default template?  The line in question is:

// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");

Is there a simple fix I could do on this line?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #11 on: May 02, 2013, 09:04:26 pm »
this line is perfectly fine.

did you make sure you removed ALL previous version of SFML 2 RC ? I'm pretty sure one version is still there.. If you have installed the framework version, search for SFML.framework. If you installed the dylib version, search for a "SFML" directory in /usr/local/include. I recommend you search for both framework and dylib. If you still can't find the file, use the command I wrote above to find all "SFML" files.
SFML / OS X developer

rorlick

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Started new template in xCode and got 'string' file not found
« Reply #12 on: May 02, 2013, 09:09:26 pm »
this line is perfectly fine.

did you make sure you removed ALL previous version of SFML 2 RC ? I'm pretty sure one version is still there.. If you have installed the framework version, search for SFML.framework. If you installed the dylib version, search for a "SFML" directory in /usr/local/include. I recommend you search for both framework and dylib. If you still can't find the file, use the command I wrote above to find all "SFML" files.

And we're good! There was some files in /usr/include, im just not sure how they got there.  I deleted them now and got a new project working, so I should be all set?(just making sure I don't need to replace those includes)

Thanks for the Help
Robert

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Started new template in xCode and got 'string' file not found
« Reply #13 on: May 02, 2013, 09:23:52 pm »
I suppose, yes.

Just make sure you also removed the old templates to prevent any confusion when making a new project. But that should be it.
SFML / OS X developer