• 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
gcc project, Xcode builds it, terminal doesn't
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc project, Xcode builds it, terminal doesn't


  • Subject: gcc project, Xcode builds it, terminal doesn't
  • From: Maximino Salazar-Lechuga <email@hidden>
  • Date: Fri, 27 Feb 2004 16:56:34 +0000

I have a little C/C++ application that I developed in linux. I'm improving it now in Xcode, but I will like to keep the portability and simplicity of the application, the structure of the application is the following:

main.cpp
header1.h
header2.h
...

All the files are contained in a folder ~/application. When I build it in Xcode, it gives me the binary file in ~/application/build, which gives no errors and runs OK.

My question is: Why when I try to compile it in a terminal? I get something like:

~/application $ gcc main.cpp
ld: Undefined symbols:
std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
std::basic_ostream<char, std::char_traits<char> >::operator<<(double)
std::basic_ostream<char, std::char_traits<char> >::operator<<(unsigned)
std::ios_base::Init::Init[in-charge]()
std::ios_base::Init::~Init [in-charge]()
std::cout
std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
operator delete[](void*)
operator delete(void*)
operator new[](unsigned long)
___gxx_personality_v0


I've checked, and Xcode is using the same compiler as the terminal, which is gcc-3.3. What I'm missing here?

Any help is appreciate it.

Max.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: gcc project, Xcode builds it, terminal doesn't
      • From: Daniel Nielsen <email@hidden>
    • Re: gcc project, Xcode builds it, terminal doesn't
      • From: gennady wexler <email@hidden>
  • Prev by Date: Re: Xcode working with J2EE classes
  • Next by Date: Re: file types for syntax highlighting
  • Previous by thread: Re: Xcode working with J2EE classes
  • Next by thread: Re: gcc project, Xcode builds it, terminal doesn't
  • Index(es):
    • Date
    • Thread