I have installed a pre-built version of GCC 2.95.3-5 on the i686-cygwin platform using the cygwin installer, placing it in the root directory. This installation worked fine when tested.
I then used it to build and install GCC 3.0 to /usr/local/, which didn't report any errors (at least as far as I can tell -- the build/install process produces far too much information IMHO making it hard to trace problems).
Compiling on either version works fine. The problem is, when linking, I get the following:
[bjam]
gcc.link ..\..\code\hello\bin\gcc\debug\hello.exe
..\..\code\hello\bin\gcc\debug\hello.o: In function `main':
/cygdrive/d/devel/ADL++/code/hello/..\..\code\hello\hello.cpp:6: undefined refer
ence to `cout'
/cygdrive/d/devel/ADL++/code/hello/..\..\code\hello\hello.cpp:6: undefined refer
ence to `ostream::operator<<(char const *)'
/cygdrive/d/devel/ADL++/code/hello/..\..\code\hello\hello.cpp:6: undefined refer
ence to `ostream::operator<<(char)'
collect2: ld returned 1 exit status
g++ -g -o "..\..\code\hello\bin\gcc\debug\hello.exe" "..\..\code\hello
\bin\gcc\debug\hello.o" -Wl,-Bdynamic -Wl,-Bstatic -Wl,-Bdynamic
...failed gcc.link ..\..\code\hello\bin\gcc\debug\hello.exe... [/bjam]
I had a workaround when using make files to add $(gcc-dir)/lib/libstdc++.a to the link files. As far as I can see, the problem occurs with the GCC 2 stdc++ library in the root directory and libstdc++3 in /usr/local/ and the linker isn't finding the correct version of libstdc++.a.
Does anyone have a better solution to this, especially as I am intending on installing other GCC versions (using, for example, --prefix=/usr/local/gcc-3.2.3)?
Regards, Reece Dunn
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger