Skip navigation

XCode: invalid host string: 'localhost'

1161 Views 5 Replies Latest reply: Dec 25, 2013 4:48 PM by Qurate RSS
Plazmotech Calculating status...
Currently Being Moderated
Dec 1, 2012 2:03 PM

Hey! I'm trying to compile some C++ code in XCode. I'm getting this error: invalid host string: 'localhost'


So I searched on the web. I found it was probably in error in hosts, so I checked it. But, my hosts was perfect! Nothing wrong with it! Here's my hosts file:



# Host Database


# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##       localhost broadcasthost

::1             localhost

fe80::1%lo0     localhost



XCode, OS X Mountain Lion (10.8.2)


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.