I'm trying to port OpenInventor freeware over to cygwin and I'm having some problems with the linkage. When trying to build the DLL, I'm coming up with some errors I'm having a hard time trying to get around.
g++ -shared -o libInventor.dll -Wl,--out-implib=libInventor.dll.a \ -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive \ ./stub.o \ ./database/src/sb/projectors/SbProjectors.o \ ./database/src/sb/Sb.o \... (more object files) -L/usr/lib -L/usr/X11R6/lib -L../libimage -L../libFL/src -ljpeg.dll -limage -lFL -lX11 -lGLU -lGL -liconv -lfreetype The errors I'm getting are mostly errors where a function is defined in 2 places... but almost all of them (except the first few) are in the SAME library (libgcc.a). Does anybody have a solution to this problem? Here's a sample of some of the build errors: ------------------------------------- /usr/lib/libcygwin.a(d000027.o)(.text+0x0): multiple definition of `___eprintf' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_eprintf.o)(.text+0x0): first defined here /usr/lib/libcygwin.a(d000085.o)(.text+0x0): multiple definition of `__alloca' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_chkstk.o)(.text+0x0): first defined here /usr/lib/w32api/libuser32.a(dicds00560.o)(.idata$5+0x0): multiple definition of [EMAIL PROTECTED]' /usr/lib/w32api/libuser32.a(dicds00628.o)(.text+0x0): first defined here /usr/lib/w32api/libuser32.a(dicds00531.o)(.idata$5+0x0): multiple definition of [EMAIL PROTECTED]' /usr/lib/w32api/libuser32.a(dicds00627.o)(.text+0x0): first defined here /usr/lib/w32api/libuser32.a(dicds00337.o)(.idata$5+0x0): multiple definition of [EMAIL PROTECTED]' /usr/lib/w32api/libuser32.a(dicds00626.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_chkstk.o)(.text+0x0): multiple definition of `___chkstk' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_chkstk.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_chkstk.o)(.text+0x0): multiple definition of `__alloca' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_chkstk.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_muldi3.o)(.text+0x0): multiple definition of `___muldi3' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_muldi3.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_negdi2.o)(.text+0x0): multiple definition of `___negdi2' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_negdi2.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_lshrdi3.o)(.text+0x0): multiple definition of `___lshrdi3' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_lshrdi3.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ashldi3.o)(.text+0x0): multiple definition of `___ashldi3' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ashldi3.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ashrdi3.o)(.text+0x0): multiple definition of `___ashrdi3' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ashrdi3.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ffsdi2.o)(.text+0x0): multiple definition of `___ffsdi2' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ffsdi2.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_clz.o)(.rdata+0x0): multiple definition of `___clz_tab' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_clz.o)(.rdata+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_cmpdi2.o)(.text+0x0): multiple definition of `___cmpdi2' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_cmpdi2.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ucmpdi2.o)(.text+0x0): multiple definition of `___ucmpdi2' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_ucmpdi2.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_floatdidf.o)(.text+0x0): multiple definition of `___floatdidf' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_floatdidf.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_floatdisf.o)(.text+0x0): multiple definition of `___floatdisf' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_floatdisf.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsdfsi.o)(.text+0x0): multiple definition of `___fixunsdfsi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsdfsi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunssfsi.o)(.text+0x0): multiple definition of `___fixunssfsi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunssfsi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsdfdi.o)(.text+0x0): multiple definition of `___fixunsdfdi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsdfdi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixdfdi.o)(.text+0x0): multiple definition of `___fixdfdi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixdfdi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunssfdi.o)(.text+0x0): multiple definition of `___fixunssfdi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunssfdi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixsfdi.o)(.text+0x0): multiple definition of `___fixsfdi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixsfdi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixxfdi.o)(.text+0x0): multiple definition of `___fixxfdi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixxfdi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsxfdi.o)(.text+0x0): multiple definition of `___fixunsxfdi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsxfdi.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_floatdixf.o)(.text+0x0): multiple definition of `___floatdixf' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_floatdixf.o)(.text+0x0): first defined here /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsxfsi.o)(.text+0x0): multiple definition of `___fixunsxfsi' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/libgcc.a(_fixunsxfsi.o)(.text+0x0): first defined here -------------------------------------------------- This goes on and on for another 100 lines or so. Again, any solutions are appreciated. -- 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/