• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't see source code for errors and warnings with external build target
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't see source code for errors and warnings with external build target


  • Subject: Re: Can't see source code for errors and warnings with external build target
  • From: Jerry <email@hidden>
  • Date: Wed, 26 Mar 2008 19:33:16 +0000


On 26 Mar 2008, at 18:35, Jonas Maebe wrote:


On 26 Mar 2008, at 19:23, Jerry wrote:
We're using SCons to build a project, and have an external build target to build from within Xcode. This works fine except that when g++ gives an error, clicking on the red error message in the Build Results window doesn't show the source code. The folder structure is like this:

	A/
		foo.xcodeproj
		B/
			C/
				foo.cpp

The project root is "A". When an error occurs in foo.cpp, the error message starts: "B/C/foo.cpp:xx: blah blah", i.e. the path is relative to /A, which is th project location and root. I've used fs_usage to try and see what Xcode is looking for and the only thing it does an lstat on is /A/B/C/foo.cpp, which is the correct path, so why doesn't it display the source code?

Note that /A/B/C/foo.cpp is relative to the root dir of the hard disk. I have in the past added an option to our compiler to always output the full path when reporting an error in order to solve exactly this problem. When Xcode calls gcc, it also passes the full, absolute path to all source files so that gcc repeats it as well in its error messages.


You may have to modify SCons (or the way you invoke it) in a similar way.


But /A/B/C/foo.cpp is the correct full path of the file - typing "open /A/B/C/foo.cpp" in Terminal will open the file in Xcode, and the "Open Quickly" command in Xcode will work with that path. It's just the Build Results window that won't show it. Xcode itself calls stat on that path with no error returned, but still ignores the file. The file is in the project. Perhaps it's something to do with the project being on an NFS-mounted filesystem - you never know if the paths are going to be /mnt or /private/var/mnt/ with NFS and maybe Xcode is getting confused by a mismatch.

You wouldn't know if there's an option to g++ to output the full path would you? I can't see it in the man page. It would be a big help, although it won't help with errors from other build tools, but they're not so important

Jerry

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Can't see source code for errors and warnings with external build target
      • From: Jonas Maebe <email@hidden>
References: 
 >Can't see source code for errors and warnings with external build target (From: Jerry <email@hidden>)
 >Re: Can't see source code for errors and warnings with external build target (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: Xcode 2.4.1 and Subversion
  • Next by Date: Re: Can't see source code for errors and warnings with external build target
  • Previous by thread: Re: Can't see source code for errors and warnings with external build target
  • Next by thread: Re: Can't see source code for errors and warnings with external build target
  • Index(es):
    • Date
    • Thread