• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: New to Mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New to Mac


  • Subject: Re: New to Mac
  • From: Steve <email@hidden>
  • Date: Thu, 9 Oct 2008 22:20:09 -0700

Ok, that was dumb on my part. cc is a symbolic link to gcc 4.0 and I thought gcc was a c++ compiler. opps, my mistake, thx.
I see in /usr/bin there is also a cpp-4.0 and cpp-4.2, I'm assuming these are c++ compilers too?
I see in /usr/bin there is also the g++-4.0 and g++-4.2 also,,,,,,Duh!


Again thank you!

Steve

On Oct 9, 2008, at 10:08 PM, Kevin Van Vechten wrote:

Hi Steve,

'cc' is the C compiler; try using the 'c++' command to compile C++ code.

- Kevin

On Oct 9, 2008, at 9:56 PM, Steve wrote:

I'm playing around trying to do some command line c++ coding, heres a stupid little program:

/* energe.cpp      */
/* Steve Young     */
/* 10-08-08        */

#include <iostream>

using namespace std;

int main(){

  cout<<"Where is that chicken gone to";
  return 0;

}//main

And here's what I get from trying to compile it. What is going on here?

steve-youngs-mac-pro:myc steve$ cc -o energy energy.cpp
Undefined symbols:
"___gxx_personality_v0", referenced from:
___gxx_personality_v0$non_lazy_ptr in ccVmTdM2.o
"std::ios_base::Init::~Init()", referenced from:
___tcf_0 in ccVmTdM2.o
"std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:
_main in ccVmTdM2.o
"std::ios_base::Init::Init()", referenced from:
__static_initialization_and_destruction_0(int, int)in ccVmTdM2.o
"std::cout", referenced from:
__ZSt4cout$non_lazy_ptr in ccVmTdM2.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
steve-youngs-mac-pro:myc steve$


Steve

PS
1.)Let me know if there's a better list for these types of questions please?
2.)Are there any command line c++ tutorials for the Mac OS X?


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: New to Mac
      • From: Steve Checkoway <email@hidden>
References: 
 >New to Mac (From: Steve <email@hidden>)
 >Re: New to Mac (From: Kevin Van Vechten <email@hidden>)

  • Prev by Date: Re: New to Mac
  • Next by Date: Re: New to Mac
  • Previous by thread: Re: New to Mac
  • Next by thread: Re: New to Mac
  • Index(es):
    • Date
    • Thread