Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode integration does not highlight source line when clicking on error message #2

Open
obdev opened this issue Nov 28, 2012 · 1 comment

Comments

@obdev
Copy link
Collaborator

obdev commented Nov 28, 2012

This seems to be a problem with paths. Gcc outputs relative paths with errors and warnings, because files were specified with relative paths in the compiler command line. Xcode therefore does not know where to search for the file.

@julian-weinert
Copy link

Pretty funny to find that almost 10 years later.
I'm commenting since there are not many references on the internet regarding this (surprise!).

The issue is that Xcode wants GCC to report errors with an absolute file path.
That does the trick.

I'm noch using CrossPack, but a simple self-made project, since I have specifically setup makefiles that should also run without Xcode as my project requires.

I finally got it working with this:

$(BUILD)/%.o: %.c
	$(GCC) -c $(CFLAGS) -mmcu=$(MCU) "${CURDIR}/$<" -o $@
                                         ^^^^^^^^^^^  ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant