Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2011
    Posts
    3

    Question C++ Training with Xcode 4

    I apologize if this was posted elsewhere, but I couldn't find it through a search.

    I was wondering if there are some things to keep in mind when compiling and running examples in Xcode from the videos before I get started. Should I ignore certain things or make sure I link a specific library or anything like that would be helpful to know before diving in?

    In case it matters, I'm using Xcode 4.3.1.

    Thanks!

  2. #2
    Join Date
    Oct 2011
    Posts
    547
    I don't think the ide does interfere with the language in that way. With that said you would probably need a compiler tied to ide (maybe gcc?).

    Try creating a new project and add the following piece of code. If it works then you are set.

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
    
    cout << "Hi World" << endl;
    
    return 0;
    }

  3. #3
    Join Date
    Oct 2011
    Posts
    3
    Yup, that works just fine. In fact, the IDE creates a new project with code very close to yours.

    I'm sure most of the basics should work fine, but I was more curious if there was anything about the C++ training series that would need to be done slightly different in Xcode (which defaults to LLVM in lieu of GCC), and if so, if anyone knew workarounds.

    I'm starting to go through the videos now, but I haven't come across anything that isn't obvious.

  4. #4
    Join Date
    Oct 2011
    Posts
    547
    Try this video [04 - Xcode Intro]

    Are you referring to the old or newer series?
    For the old series there is the Thread of information that has some updates for the code given in the video.

    For the new series (C++ -> Software engineering), the one with the xcode videos, only the first 10 videos are offered freely -as sample-.

    Other then that maybe Mac users might help you better .
    Last edited by florem; 03-20-2012 at 03:52 PM. Reason: Modified from "5 or 6" to 10. :)

  5. #5
    Join Date
    Jul 2008
    Location
    Essex, United Kingdom
    Posts
    248
    The first 10 videos are free in the Software Engineering videos, they'll give you some C++ practice in Xcode.

  6. #6
    Join Date
    Jul 2010
    Posts
    472
    The C++ Complete VTMs are geared quite heavily toward Windows until OpenGL In-Depth, so if you plan to go through those and follow along, you might either want to use a Windows computer, or prepare to do a bit of research to find replacements for the things that simply won't work on Mac from those videos due to OS-dependency.

    A few immediate examples are getting ticks, getting rid of the console-cursor, displaying the un-blinking map, and I think the UI provided in... VTM 4? Which, if I recall, uses WinAPI.

    Note that there will be some small things even in the OpenGL In-Depth VTM that won't compile on Mac, but they're -very- simple things that should be pretty easy to pick up on, and they're rare throughout. Pretty much, once you pick up on the... I think two problems that arise, you can prevent any errors from cropping up by not following along -exactly- with the videos.

    EDIT: And there isn't a difference as far as whether it'll run or not between GCC and LLMV that I can tell. I tend to leave it on LLMV these days, as compile times seem to be faster.
    Last edited by PDI247; 03-20-2012 at 04:29 PM.
    "It's most impressive when it's least expected."

  7. #7
    Join Date
    Oct 2011
    Posts
    3
    Thanks for all the responses!

    So from what it sounds like I'm going to be mostly okay with a few small exceptions. I'm not worried about the console-cursor too much with the console output in Xcode, but I will keep the "un-blinking map" in mind as I watch. I'm also not worried about the UI stuff because I just want a refresher into the core syntax (also, wxWidgets and WinAPI is useless for me ) before I focus on OpenGL stuff.

    Thanks again!

  8. #8
    Join Date
    Feb 2005
    Location
    Bellevue, WA
    Posts
    3,251
    For Xcode, do NOT use GCC. There is no point and soon it won't be there anyway. Stick with Clang (LLVM).

    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." ~Rich Cook

  9. #9
    Join Date
    Oct 2011
    Posts
    547
    @owensd I know this is a little offtopic but are you going to continue the series? Or be a special guest at the new c++ class?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •