Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"no source file named main.c"



I have been unable to get XCode 2.1 (on OS X 10.4.2) to stop at a breakpoint in my Makefile-based project's main.c file. When I check XCode's Console Log I find an error message from gdb: "no source file named main.c".

Here are the basic facts:

1. My project consists of two files in the project's root directory: Makefile and main.c. I do not have the files grouped in any way within XCode's "Groups and Files" pane.

2. The output of my Makefile is an executable that is also in the project's root directory.

3. My Makefile has -g set for compilation. I've confirmed with nm -ap that my project's root directory and "main.c" are encoded in the executable that gets built by the Makefile.

4. I am able to use gdb from the command line to set and stop at breakpoints in the executable.

Given the above, it seems to me that I have misconfigured XCode somehow. But I cannot seem to figure out how.


On a related note, I attempted to perform the same debugging test using Eclipse 3.1 with CDT 3.0 and got the very same "no source file named main.c" result.



I would sure appreciate any assistance that anybody could provide.

Doug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.