Folks, I did some research at mailing list, faq and I didn't seek any information about this error . I am trying to build an installer of some great tools of linux to windows, but I wanna use and Cygwin runtime and Mingw(please don't redirect to another list). I am going to explain what I did:
$ grep fstati64 /c/bin/*.dll Binary file /c/bin/hdf5dll.dll matches Binary file /c/bin/libcurl.dll matches Binary file /c/bin/msvcr71.dll matches Binary file /c/bin/msvcrt.dll matches I can see an importation in mingw : $ nm -g /usr/lib/gcc/i686-pc-mingw32/3.4.4/debug/libstdc++.a |grep fstati64 U __fstati64 or $ find /usr/lib -name "*.a" -exec grep fstati64 {} \; Binary file /usr/lib/gcc/i686-pc-mingw32/3.4.4/debug/libstdc++.a matches Binary file /usr/lib/gcc/i686-pc-mingw32/3.4.4/libstdc++.a matches In particular, I would have expected it to be exported by one or more of the /usr/lib/w32api/libmsvc*.a files. In this directory are: $ nm -o /usr/lib/w32api/libmsvcrt.a | grep fstati* /usr/lib/w32api/libmsvcrt.a:daqgds00255.o:00000000 T __fstat64 /usr/lib/w32api/libmsvcrt.a:daqgds00255.o:00000000 I __imp___fstat64 /usr/lib/w32api/libmsvcrt.a:daqgds00254.o:00000000 T __fstat /usr/lib/w32api/libmsvcrt.a:daqgds00254.o:00000000 I __imp___fstat I have seen fstat64 which does something similar but is not linkage (and possibly not functionality) compatible. I decided to download a mingw in my laptop and I found: grep -rl fstati64 /usr/i586-mingw32msvc/lib/libmsvc* /usr/i586-mingw32msvc/lib/libmsvcr70.a /usr/i586-mingw32msvc/lib/libmsvcr70d.a /usr/i586-mingw32msvc/lib/libmsvcr71.a /usr/i586-mingw32msvc/lib/libmsvcr71d.a /usr/i586-mingw32msvc/lib/libmsvcr80.a /usr/i586-mingw32msvc/lib/libmsvcr80d.a /usr/i586-mingw32msvc/lib/libmsvcrt.a /usr/i586-mingw32msvc/lib/libmsvcrtd.a I am not suere bu I think there are some coincidences of fstati64 with the current version of mingw. My Makefile is at http://pastebin.com/EQGuXsEx and the output of make is too long sorry for this: $ make make all-recursive make[1]: Entering directory `/cygdrive/c/build/setup' Making all in libgetopt++ make[2]: Entering directory `/cygdrive/c/build/setup/libgetopt++' make[2]: Leaving directory `/cygdrive/c/build/setup/libgetopt++' Making all in tests make[2]: Entering directory `/cygdrive/c/build/setup/tests' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/cygdrive/c/build/setup/tests' make[2]: Entering directory `/cygdrive/c/build/setup' /bin/sh ./libtool --tag=CXX --mode=link g++ -mno-cygwin -Werror -Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -mwindows -L/usr/lib/w32api -o setup.exe AntiVirus.o archive.o archive_tar.o archive_tar_file.o autoload.o choose.o compress.o compress_bz.o compress_gz.o ConnectionSetting.o ControlAdjuster.o cygpackage.o desktop.o express_package.o dialog.o diskfull.o download.o Exception.o find.o FindVisitor.o filemanip.o fromcwd.o geturl.o ini.o IniDBBuilderPackage.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 LogFile.o LogSingleton.o main.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 PickPackageLine.o PickView.o postinstall.o prereq.o proppage.o propsheet.o res.o root.o ScanFindVisitor.o script.o setup_version.o simpsock.o site.o source.o SourceSetting.o splash.o state.o String++.o threebar.o UserSetting.o UserSettings.o win32.o window.o csu_util/MD5Sum.o csu_util/rfc1738.o csu_util/version_compare.o libmd5-rfc/md5.o libinilex.a libgetopt++/libgetopt++.la res.o -lbz2 -lz -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -lws2_32 -lstdc++ -lmingw32 -lws2_32 libtool: link: g++ -mno-cygwin -Werror -Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -mwindows -o setup.exe AntiVirus.o archive.o archive_tar.o archive_tar_file.o autoload.o choose.o compress.o compress_bz.o compress_gz.o ConnectionSetting.o ControlAdjuster.o cygpackage.o desktop.o express_package.o dialog.o diskfull.o download.o Exception.o find.o FindVisitor.o filemanip.o fromcwd.o geturl.o ini.o IniDBBuilderPackage.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 LogFile.o LogSingleton.o main.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 PickPackageLine.o PickView.o postinstall.o prereq.o proppage.o propsheet.o res.o root.o ScanFindVisitor.o script.o setup_version.o simpsock.o site.o source.o SourceSetting.o splash.o state.o String++.o threebar.o UserSetting.o UserSettings.o win32.o window.o csu_util/MD5Sum.o csu_util/rfc1738.o csu_util/version_compare.o libmd5-rfc/md5.o res.o -L/usr/lib/w32api libinilex.a libgetopt++/.libs/libgetopt++.a -lbz2 -lz -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -lstdc++ -lmingw32 -lws2_32 /usr/lib/gcc/i686-pc-mingw32/3.4.4/libstdc++.a(basic_file.o):basic_file.cc:(.text+0x4ed): undefined reference to `__fstati64' collect2: ld returned 1 exit status Makefile:721: recipe for target `setup.exe' failed make[2]: *** [setup.exe] Error 1 make[2]: Leaving directory `/cygdrive/c/build/setup' Makefile:898: recipe for target `all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/cygdrive/c/build/setup' Makefile:640: recipe for target `all' failed make: *** [all] Error 2 I don't know why it has undefined reference to __fstati64. I am a little confused because, I think the reason could be: * Install a newer version of runtime libraries but probably might need a newer version of the compiler and linker as well( I have heard newer versions of GCC do not understand the -mno-cygwin option), the version of my GCC 3.4.4 * Replace the functions in stat and _stat in <sys/stat.h> with fstat64 (which has the Large File Support Issue with MinGW) or using _FILE_OFFSET_BITS. I found some clues to the large file support issue in this thread http://sourceware.org/ml/binutils/2011-01/msg00076.html Could you give me some help please? I want to use _fstati64. Best regards, Steve -- Steve Ataucuri Cruz School of Computer Science, San Pablo Catholic University - Arequipa, Peru (http://www.ucsp.edu.pe), Screen Names : stonescen...@hotmail.com (Windows Live Messenger) stonescen...@gmail.com (Google talk) stonescen...@yahoo.com (Yahoo Messenger) stonescenter (Skype) +51.972529201 (Mobile) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple