I'm trying to build a program in Cygwin using the x86_64-w64-mingw32 stuff. When I compile and link my program just with x86_64-w64-mingw32-gcc.exe, it compiles and links fine. But when I try to use a makefile to compile and link in separate steps, it gives the following errors:
$ make -f spi_comm.mkming-ld -o spi_comm.exe spi_comm.o "ftdi/libmpsse-windows-1.0.3/release/build/x64/libmpsse.lib"ming-ld: spi_comm.o:spi_comm.c:(.text+0x33): undefined reference to `__mingw_vfprintf'ming-ld: spi_comm.o:spi_comm.c:(.text+0x72): undefined reference to `__imp___acrt_iob_func'ming-ld: spi_comm.o:spi_comm.c:(.text+0x83): undefined reference to `__mingw_vfprintf'ming-ld: spi_comm.o:spi_comm.c:(.text+0x1b6): undefined reference to `__imp___acrt_iob_func'ming-ld: spi_comm.o:spi_comm.c:(.text+0x1e0): undefined reference to `exit'ming-ld: spi_comm.o:spi_comm.c:(.text+0x20f): undefined reference to `__imp___acrt_iob_func'ming-ld: spi_comm.o:spi_comm.c:(.text+0x239): undefined reference to `exit'ming-ld: spi_comm.o:spi_comm.c:(.text+0x245): undefined reference to `__imp___acrt_iob_func'ming-ld: spi_comm.o:spi_comm.c:(.text+0x263): undefined reference to `exit'ming-ld: spi_comm.o:spi_comm.c:(.text+0x27a): undefined reference to `__main'make: *** [spi_comm.mk:28: spi_comm.exe] Error 1 I suppose I need to name the mingw libraries to include at the linker step, but how can I identify which libraries are needed? There is quite a long list under /usr/x86_64-w64-mingw32/sys-root/mingw/lib. I've searched in vain for a solution to the __mingw_vfprintf library reference. Is there a standard C library that I should name for the linker? Thanks,Mark _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public