This is the mail archive of the gcc@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: Gcc 3.2 on CYGWIN


On Fri, Aug 16, 2002 at 02:29:09PM -0400, Éric Béchet wrote:
> Hi there,
> 
> I just succeeded in compiling GCC3.2 on cygwin.
> here are the infos :
> 
> $ gcc -v
> Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.2/specs
> Configured with: /home/bechet/gcc3.2/gcc-3.2/configure
> Thread model: single
> gcc version 3.2
> 
> $ ./config.guess
> i686-pc-cygwin

If you want this included in the build status list (once it works, that
is), please include the versions of Cygwin and Windows.
> 
> The config is standard :
> configure
> make bootstrap
> make install

Building in the source directory is not supported.  The recommended
procedure is:

  mkdir gcc-obj-3.2  (or whatever you want to call this directory)
  cd gcc-obj-3.2
  ../gcc-3.2/configure <options>
  make bootstrap
  make install
> 
> 
> 
> However, any program using the iostream library gives a lot of errors at
> linking. Others seem to compile and work fine so far. It seem the linker is
> unable to find the library to link with.
> 
> e.g. the program :
> #include <iostream>
> int main(void)
> {
>     std::cout << "hello world" << std::endl;
>     return 0;
> }
> 
> gives those errror below when compiled and linked : Any clue on a workaround
> for
> this ? (it was working previously with the gcc 2.95.x.x shipped with cygwin)

This might be a problem from building in the source directory, or there
might be conflicts between newly-installed files and files that were
in the same location from an earlier install; we now recommend
installing each release in a unique location, or else cleaning out the
files from an earlier release before installing a new one in the same
place.

> 
> Thaks for any help,
> 
> Eric Bechet
> 
> 
> 
> $ g++ toto.c
> /cygdrive/c/DOCUME~1/BECHET~1.MEC/LOCALS~1/Temp/cctoDYLI.o(.text+0x2d):toto.
> c: undefined reference to `std::cout'
> 
> /cygdrive/c/DOCUME~1/BECHET~1.MEC/LOCALS~1/Temp/cctoDYLI.o(.text+0x3a):toto.
> c: undefined reference to `std::basic_ostream<char, std::char_traits<char>
> >& std::operator< < <std::char_traits<char> >(std::basic_ostream<char,
> std::char_traits<char> >&, char const*)'
> 
> ***a lot more messages***
> 
> collect2: ld returned 1 exit status
> 

Janis


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