|
From: Jannick <thi...@gm...> - 2016-10-01 16:25:31
|
Hi Eli, Thanks for this. > From: Eli Zaretskii [mailto:el...@gn...] > Sent: Saturday, October 1, 2016 5:37 PM > > > > mingw32-g++.exe -o t.exe main.c -lbfd -lintl -liberty -lz > > > > should be fine, in principle, i.e. MinGW’s bfd appears to depend on the > libraries intl, (l)iberty and z, at least. > > For MinGW compilation gcc needs -LC:\MinGW\msys\1.0\lib for linking. > > But still, the MinGW compiler is > > complaining: > > > > c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../libbfd.a(archive.o):(.t > > ext+0x3f4): undefined reference to `filename_ncmp' > > > filename_ncmp is in libiberty.a, so I don't understand why you are getting > these unresolved externals. Perhaps your libiberty.a is from an old > distribution? I am using the version of libliberty.a shipped with msys as part of MinGW. I reinstalled all of MinGW and Msys with Mingw-get upgrade --reinstall --recursive to use the latest versions available. Then libliberty.a (in C:\MinGW\msys\1.0\lib) has a file datestamp as of Jan 16, 2010, with a file size of 344kB. Supposedly this is outdated. Notably, while libbfd.a is available in the MinGW library folder, liberty.a is not which is why I linked the version in the msys folder. Is it thus possible that bfd & liberty in MinGW/Msys do not fit together? Many thanks again, J. |