Christopher Faylor wrote: >On Thu, Jul 11, 2002 at 05:03:35PM +0200, Pavel Tsekov wrote: > >>Hello Nicholas, >> >>Thursday, July 11, 2002, 4:41:05 PM, you wrote: >> >>>>Which leads me to conclude that the logic for the gcc-2/g++-2 specs no >>>>longer includes /usr/include/w32api in its default search path. >>>>Anyhow, I thought I'd post this for anyone who is trying to compile >>>>setup.exe with the new gcc-2/g++-2. The answer is to include >>>>-I/usr/include/w32api in your CPPFLAGS until this gets cleared up. >>>> >>NW> Ok, >> >>NW> Strike that, that didn't fix the problem. I'm looking into it now. >> >>windres is part of binutils not the gcc suite. I just hacked my way >>through this by setting --include-dir=/usr/include/w32api.. I guess >>a configure test doesn't get the proper value. >> > >Hmm. AFAIK, I haven't changed anything with the include logic. I changed >things in gcc some time ago so that w32api wasn't included unless you >added a -mwin32 to your command line. So, I don't know why this is >suddenly required. > >cgf > Sorry Pavel,
It worked to a certain extent, but now it's not linking properly. I'll have to investigate more. Meanwhile, here's the output from ld: windres --include-dir ../setup --include-dir /usr/include/w32api -o res.o ../setup/res.rc ../setup/res.rc:217:6: invalid preprocessing directive #CONTROL /bin/bash ./libtool --mode=link g++-2 -mno-cygwin -Werror -Wall -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcomments -g -O2 -o setup.exe -mwindows archive.o archive_tar.o archive_tar_file.o autoload.o category.o choose.o cistring.o compress.o compress_bz.o compress_gz.o concat.o cygpackage.o desktop.o dialog.o diskfull.o download.o Exception.o find.o FindVisitor.o filemanip.o fromcwd.o geturl.o hash.o ini.o IniDBBuilder.o IniDBBuilderPackage.o inilex.o iniparse.o IniParseFeedback.o IniParseFindVisitor.o install.o io_stream.o io_stream_cygfile.o io_stream_file.o io_stream_memory.o localdir.o log.o LogFile.o LogSingleton.o main.o md5.o MD5++.o mkdir.o mklink2.o mount.o msg.o net.o netio.o nio-ie5.o nio-file.o nio-ftp.o nio-http.o package_db.o package_meta.o package_source.o package_version.o PackageSpecification.o PickCategoryLine.o PickLine.o PickPackageLine.o PickView.o postinstall.o proppage.o propsheet.o rfc1738.o root.o ScanFindVisitor.o script.o setup_version.o simpsock.o site.o source.o splash.o state.o String++.o threebar.o version.o win32.o window.o res.o zlib/libzcygw.a bz2lib/libbz2.a libgetopt++/libgetopt++.la -lstdc++ -luser32 -lkernel32 -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid -lmingw32 mkdir .libs libtool: link: warning: library `/usr/lib/mingw/libstdc++.la' was moved. libtool: link: warning: library `/usr/lib/mingw/libstdc++.la' was moved. g++-2 -mno-cygwin -Werror -Wall -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcomments -g -O2 -o setup.exe -mwindows archive.o archive_tar.o archive_tar_file.o autoload.o category.o choose.o cistring.o compress.o compress_bz.o compress_gz.o concat.o cygpackage.o desktop.o dialog.o diskfull.o download.o Exception.o find.o FindVisitor.o filemanip.o fromcwd.o geturl.o hash.o ini.o IniDBBuilder.o IniDBBuilderPackage.o inilex.o iniparse.o IniParseFeedback.o IniParseFindVisitor.o install.o io_stream.o io_stream_cygfile.o io_stream_file.o io_stream_memory.o localdir.o log.o LogFile.o LogSingleton.o main.o md5.o MD5++.o mkdir.o mklink2.o mount.o msg.o net.o netio.o nio-ie5.o nio-file.o nio-ftp.o nio-http.o package_db.o package_meta.o package_source.o package_version.o PackageSpecification.o PickCategoryLine.o PickLine.o PickPackageLine.o PickView.o postinstall.o proppage.o propsheet.o rfc1738.o root.o ScanFindVisitor.o script.o setup_version.o simpsock.o site.o source.o splash.o state.o String++.o threebar.o version.o win32.o window.o res.o zlib/libzcygw.a bz2lib/libbz2.a libgetopt++/.libs/libgetopt++.a -lstdc++ -L/usr/lib/mingw -L/usr/lib/w32api -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8 -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/../../../../i686-pc-cygwin/lib -lstdc++-2 /usr/lib/mingw/libstdc++.a -L/develop/gcc-3.1/build/mingw32/libstdc++-v3/src -L/develop/gcc-3.1/build/mingw32/libstdc++-v3/src/.libs -L/develop/gcc-3.1/build/gcc -L/mingw/mingw32/bin -L/mingw/mingw32/lib -L/mingw/lib/gcc-lib/mingw32/3.1 -L/mingw/lib/gcc-lib/mingw32/3.1/../../../../mingw32/lib -L/mingw/lib/gcc-lib/mingw32/3.1/../../.. -lm -lshell32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid -lmingw32 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libgcc.a(tinfo2.o)(.text+0xc): multiple definition of `__dynamic_cast' /usr/lib/mingw/libstdc++.a(tinfo.o)(.text$__dynamic_cast+0x0): first defined here LogFile.o: In function `_7LogFilei': /usr/src/cygwin-setup-src/build/../setup/LogFile.cc:71: undefined reference to `streambuf::xsputn(char const *, int)' LogFile.o: In function `_7LogFilei': /usr/include/g++-3/streambuf.h:479: undefined reference to `streambuf::xsgetn(char *, int)' /usr/include/g++-3/streambuf.h:477: undefined reference to `streambuf::sys_read(char *, int)' /usr/include/g++-3/streambuf.h:477: undefined reference to `streambuf::sys_write(char const *, int)' libgetopt++/.libs/libgetopt++.a(OptionSet.o): In function `basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> >::replace(unsigned int, unsigned int, char const *, unsigned int)': /usr/include/g++-3/std/bastring.cc(.text$__ls__H3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0_R7ostreamRCt12basic_string3ZX01ZX11ZX21_R7ostream+0x18): undefined reference to `ostream::write(char const *, int)' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$_Z21base_of_encoded_valuehP15_Unwind_Context+0x4d): undefined reference to `_Unwind_GetDataRelBase' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$_Z21base_of_encoded_valuehP15_Unwind_Context+0x5d): undefined reference to `_Unwind_GetRegionStart' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$_Z21base_of_encoded_valuehP15_Unwind_Context+0x68): undefined reference to `_Unwind_GetTextRelBase' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$_Z17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info+0x1f): undefined reference to `_Unwind_GetRegionStart' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$__gxx_personality_v0+0x46): undefined reference to `_Unwind_GetLanguageSpecificData' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$__gxx_personality_v0+0x8a): undefined reference to `_Unwind_GetIP' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$__gxx_personality_v0+0x1ce): undefined reference to `_Unwind_SetGR' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$__gxx_personality_v0+0x1e0): undefined reference to `_Unwind_SetGR' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$__gxx_personality_v0+0x1ef): undefined reference to `_Unwind_SetIP' /usr/lib/mingw/libstdc++.a(eh_personality.o)(.text$__cxa_call_unexpected+0xe8): undefined reference to `_Unwind_Resume' /usr/lib/mingw/libstdc++.a(eh_throw.o)(.text$__cxa_throw+0x50): undefined reference to `_Unwind_RaiseException' /usr/lib/mingw/libstdc++.a(eh_throw.o)(.text$__cxa_rethrow+0x1b): undefined reference to `_Unwind_RaiseException' /usr/lib/mingw/libstdc++.a(eh_catch.o)(.text$__cxa_end_catch+0x3d): undefined reference to `_Unwind_DeleteException' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iostream.o)(.text+0x17c7):iostream.cc: undefined reference to `_impure_ptr' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iostream.o)(.text+0x17d8):iostream.cc: undefined reference to `_impure_ptr' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(streambuf.o)(.text+0x3e3):streambuf.cc: undefined reference to `__errno' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(stdstrbufs.o)(.text+0x4e):stdstrbufs.cc: undefined reference to `_impure_ptr' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(fileops.o)(.text+0x19d):fileops.c: undefined reference to `__errno' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(fileops.o)(.text+0x210):fileops.c: undefined reference to `__errno' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(fileops.o)(.text+0x26d):fileops.c: undefined reference to `__errno' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(fileops.o)(.text+0x398):fileops.c: undefined reference to `__errno' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(fileops.o)(.text+0x45d):fileops.c: undefined reference to `__errno' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(fileops.o)(.text+0x5ad):fileops.c: more undefined references to `__errno' follow /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iovfscanf.o)(.text+0x61):iovfscanf.c: undefined reference to `_imp___ctype_' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iovfscanf.o)(.text+0x8d):iovfscanf.c: undefined reference to `_imp___ctype_' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iovfscanf.o)(.text+0x55c):iovfscanf.c: undefined reference to `_imp___ctype_' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iovfscanf.o)(.text+0x5ac):iovfscanf.c: undefined reference to `_imp___ctype_' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iovfscanf.o)(.text+0x823):iovfscanf.c: undefined reference to `_imp___ctype_' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-8/libstdc++-2.a(iovfscanf.o)(.text+0x87d):iovfscanf.c: more undefined references to `_imp___ctype_' follow Sigh, once again into the fray! Cheers, Nicholas
