On Aug 16, 2008, at 8:04 AM, Alejandro Aragon wrote:
I come from Ubuntu Linux to Mac, and I found out that I could install several of the applications that I use for research using the macports software. Therefore, even though I have xcode 3.1, I use the gcc4.3 that I downloaded and compiled using macports to compile my code. I also needed a lot of libraries (boost, gmp and others) so I had to install those using macports as well. Header files are within /opt/local/include and libraries under /opt/local/lib in order not to mess with the ones that came with the system. I also use autotools to manage all the makefiles, so in xcode I created a project using the "External Build System" option.
As I mentioned, the jump to definition function works only for files in the directory where my code is, and maybe those of the system. However, as I mentioned before I have other libraries and header files located under /opt/local. So this might be why I cannot jump to definitions in those files. It seems that the indexing is not taking into account those paths, but I haven't found a way to include those paths.
While we provide this option with Xcode, we currently can't support the same level of IDE features with it that we do for what are called native targets, because we don't attempt to dissect the makefile and figure out all of its values.
So, for example, we don't know the header search paths that the makefile sets, and therefore we can't find and index the headers that your source files refer to.
WIth a native target, all of those values are set in the Xcode user interface itself, so Xcode knows about them and can use them. Native targets are primarily used for Cocoa and Carbon Mac OS X application, applications that aren't cross-platform.
You're doing the right thing by using an external target, but unfortunately, you will get a reduced level of support from Xcode when you do so. This is a known issue.
I check that the bubbles option was set before sending my original email. I tried also compiling my code with gcc4.2 that comes with xcode 3.1 to see if that made a difference but nothing, so I switched back to the macports version. So I guess there is a bug, since the only thing I did was to create an external build system project (for which I already have a makefile). So unless you have further suggestions, I will create a bug report.
We show errors and warnings by parsing the build output. It may be that your makefile's output is not what we expect, though if it's standard make I don't see why it wouldn't expect it.
This isn't my area. It may be a known issue, it may not. When in doubt, file a bug.
Well, so far I like the fact that xcode is much faster than Eclipse (maybe because Eclipse is written in Java). I found that you could actually auto-indent the code using the re-indent feature, so after changing a couple of key-bindings I set command-I to auto-indent everything. What I don't like though, is that it auto-indents everything within a namespace, and this is quite annoying since most good C++ code should be within namespaces, so indenting it is a waste of space. I guess this should be a feature that you turn on or off, but there is nothing in the preferences (or at least I didn't find it). There is another feature that I miss from Eclipse and is the integration is has for documenting the code with doxygen.
This list is for providing support to Xcode users, but the help you get is not some sort of official Apple communications channel. Instead, it's both third-party and Apple engineers taking some of their spare time to help out.
As such, while you're more than welcome to mention features that you want, mentioning them here does very little to make sure they are heard by the people at Apple who need to hear them. You can file an "enhancement" bug for this purpose.