This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Basic install problem.


Robert Jones wrote:
Thousands of people must have done this successfully - but it seems I can't!

Just installed Cygwin including gcc on Windows XP, taking all the defaults.

#include <iostream>

int main( )
 {
    std::cout << "Hello" << std::endl;
 }

$ gcc hello.cpp

/cygdrive/c/DOCUME~1/ROBJON~1/LOCALS~1/Temp/ccr1lzvF.o:hello.cpp:(.text+0xd):
undefined reference to `std::basic_string<
char, std::char_traits<char>, std::allocator<char> >::size() const'
 /cygdrive/c/DOCUME~1/ROBJON~1/LOCALS~1/Temp/ccr1lzvF.o:hello.cpp:(.text+0x60):
undefined reference to `std::basic_string
 <char, std::char_traits<char>, std::allocator<char>
::operator[](unsigned int) const'

What am I doing wrong guys?

Use the c++ compiler.


g++ hello.cpp

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]