This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: undefined reference to `__imp___iob'
"Frederich, Eric P21322" wrote:
> If it (mixing msys/mingw and cygwin libraries) is "not encouraged" or
> "not supported", then I just won't do it and I'll either start using
> Msys for everything or start keeping two copies of the Windows libraries
> around.
It's not supported, correct. But using -mno-cygwin is exactly the same
as using MinGW/MSYS, which is why you're suddenly confusing us all by
what you're saying.
> gcc -O2 -I/mylibraries/libraries/include -c someProgram.c -o
> win/someProgram.o
> gcc -O2 -I/mylibraries/libraries/include -c autocad.c -o win/autocad.o
> gcc -O2 -I/mylibraries/libraries/include -c diagrams.c -o
> win/diagrams.o
> gcc -O2 -I/mylibraries/libraries/include -c dxf.c -o win/dxf.o
> gcc -O2 -I/mylibraries/libraries/include -c graph.c -o win/graph.o
> gcc -O2 -I/mylibraries/libraries/include -c heap.c -o win/heap.o
> gcc -O2 -I/mylibraries/libraries/include -c sort.c -o win/sort.o
> gcc -O2 -I/mylibraries/libraries/include -c swdconn.c -o win/swdconn.o
> gcc -O2 -I/mylibraries/libraries/include -c util.c -o win/util.o
These objects are compiled without -mno-cygwin, so they are Cygwin
objects.
> /mylibraries/libraries/lib/libhdg_win.a(hdg_win.o):hdg_win.c:(.text+0x13
> ): undefined reference to `__imp___iob'
This library is a MinGW library, so this link is doomed to failure.
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/