This is the mail archive of the cygwin mailing list for the Cygwin 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: BUG gcc-mingw 20040810-1 library search path

Hallo sengtsongpa-cygwin001,

> 1. Grab a copy of Cygwin Setup sources from CVS (the
> stable source bundle idstributed with the net
> installer will do equally well). You need a copy of
> libgetopt++ from a parallel directory.

> 2. Bootstrap and configure:

> bash-2.05b-$ ./configure CC="gcc -mno-cygwin" CXX="g++
> -mno-cygwin" --target=mingw32 --build=mingw32

> 3. Watch the build belly up at the linking stage:


> undefined reference to `_IID_IPersistFile'
> collect2: ld returned 1 exit status
> make[2]: *** [setup.exe] Error 1
> make[2]: Leaving directory
> `/cygdrive/d/cvscache/cygwin-apps/setup'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/cygdrive/d/cvscache/cygwin-apps/setup'
> make: *** [all] Error 2

> The symbol _IID_IPersistFile is in libuuid. This
> worked fine with previous cygmin comnpilers.

Which version of gcc do you think it is working?  Have you reinstalled
the 'known to work' gcc version?  Isn't linking done by the linker?

This is in binutils/ld/configure.tgt:
i[3-7]86-*-cygwin*)     targ_emul=i386pe ;
                        targ_extra_ofiles="deffilep.o pe-dll.o"
                        test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;

where tooldir should be /usr/i686-pc-mingw32 in this case and you need
to have the symlinks installed in /usr/i686-pc-mingw32:
    21 Nov  1  2003 bin -> ../i686-pc-cygwin/bin
    16 Nov  1  2003 include -> ../include/mingw
    12 Nov  1  2003 lib -> ../lib/mingw

Now, the library path automatically searched by the linker is:

% export tooldir=/usr/i686-pc-mingw32
% ls ${tooldir}/lib/w32api
ls: /usr/i686-pc-mingw32/lib/w32api: No such file or directory

Hmmm, doesn't work, but it was always this way, wasn't it?

Maybe the definition of tooldir for binutlis builds has changed?

Sorry, but I don't see where I should change the bits in gcc.


Unsubscribe info:
Problem reports:

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