Re: Xcode-users Digest, Vol 5, Issue 544
Re: Xcode-users Digest, Vol 5, Issue 544
- Subject: Re: Xcode-users Digest, Vol 5, Issue 544
- From: Alejandro Aragon <email@hidden>
- Date: Sat, 16 Aug 2008 10:04:41 -0500
Message: 10
Date: Fri, 15 Aug 2008 18:49:02 -0700
From: Andrew Pontious <email@hidden>
Subject: Re: what is the state of C++ support in xcode?
To: list Xcode-users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
On Aug 15, 2008, at 1:38 PM, Alejandro Aragon wrote:
Can anyone point out a link on how to work with C++ under xcode? I
come from Eclipse and it seems to me that there are many features
that Eclipse has and they're not present in xcode. The bubbles with
errors do not show up in the files, the refactor command is always
unavailable, formatting of the code is not there, the jump to
definition doesn't work for files outside the project's, to mention
a few. I'm new to xcode so maybe I just need to get used to it. Does
anyone have a reference to a tutorial on how to work with C++ under
xcode?
If you're new to Xcode, I recommend reading the Xcode documentation.
In Xcode 3.1, there is a menu item, Help -> Xcode Workspace Guide
which should get you started. "Workspace" here means, as it says in
the guide, "the windows you use regularly to develop products using
the Xcode application."
If you go to Help -> Documentation, you'll be taken to the main
documentation window, which along the left has lists of documentation
sets that you can download from Apple. You will be prompted for your
ADC username and password to begin these downloads. Look especially at
the Developer Tools Library documentation set.
Once you've gotten a little more familiar with Xcode in general, then
it will make more sense to talk about the specific issues you have.
Andrew, thanks for replying to my email. I haven't answered before
because I have set the digest option in the list and you sent the
email only to the list. I appreciate your feedback on this and I will
definitely follow your advice. This is exactly what I was looking for.
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.
The bubbles with errors do not show up in the files,
In Xcode, these are called "message bubbles". You should check whether
this preference is on for you in Xcode. Go to Xcode -> Preferences
(also available via Cmd-comma), go to the Building pane, and look at
the "Message Bubbles" setting. You'll probably want to set it to "Show
during builds: On Errors and Warnings." If it's already set to that,
and you still don't see any errors and warnings in your editor windows
when you build -- assuming you have errors and warnings -- then that's
probably a bug. You'll want to file a bug at http://bugreporter.apple.com
and provide as much detail as you can about what's going on: provide
a sample project and list the specific steps you took to get the
results you did.
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.
the jump to definition doesn't work for files outside the project
Please go into more detail about this. For frameworks that are
referred to by a project, jumping to the definition of a framework
symbol should take you to the declaration of that symbol in the
framework's headers. There are other cases where Xcode does not work
as well, but we'll need to know more about your situation to help you
with it.
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.
the refactor command is always unavailable
This is actually the first C++-specific issue you've mentioned.
Refactoring is only supported in Xcode at this time for C and
Objective-C files, not C++ or Objective-C++ or any other language.
You will probably find some areas where Xcode's C++ support is not as
advanced as in some other IDEs, such as Visual Studio. Objective-C
always has a bit of an edge over C++ in Xcode because it's simpler to
support, and it's the language that Mac OS X and Xcode itself are
written in.
That said, we are interested to hear about the ways you would like to
see us improve our C++ support, and we are interested in hearing about
your experiences and working style with C++ as a new Xcode user.
-- Andrew
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.
Once again, thanks for replying.
Alejandro
_______________________________________________
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