|
From: Gilgamesh N. <Gil...@el...> - 2003-01-08 14:54:16
|
Hi all, I'm trying to use MinGW (using Cygwin as evironment) to build against a MSVC generated ingres.lib It almost works but during the linking phase it cannot find a reference to '_chkstk'. The original commandline that the IDE wants to use is this: link /NOLOGO /SUBSYSTEM:console /ENTRY:mainCRTStartup /OUT:tt.exe /MAP:tt.map D:\ingres\ingres\lib\abfmain.obj D:\ingres\ingres\abf\xltt\tt\abextract.obj D:\ingres\ingres\abf\xltt\tt\start.obj D:\ingres\ingres\abf\xltt\tt\blah.obj D:\ingres\ingres\abf\xltt\tt\10010.obj shell32.lib msvcrt.lib libc.lib kernel32.lib user32.lib mpr.lib advapi32.lib netapi32.lib libcmt.lib D:\ingres\ingres\lib\ingres.lib After it's rewritten this is the commandline that I use to build (libc.lib and libcmt.lib get dropped because I couldn't find a replacement for them and as far as I can tell they belong to MSVC itself so I was hoping that MinGW replaces their functionality): /usr/bin/gcc -mno-cygwin -mconsole \ -o tt.exe /ingres/ingres/lib/abfmain.obj \ /ingres/ingres/abf/xltt/tt/abextract.obj \ /ingres/ingres/abf/xltt/tt/start.obj \ /ingres/ingres/abf/xltt/tt/blah.obj \ /ingres/ingres/abf/xltt/tt/10010.obj \ -lshell32 -lmsvcrt -lkernel32 -luser32 \ -lmpr -ladvapi32 -lnetapi32 \ /ingres/ingres/lib/ingres.lib And this is the output it generates: /ingres/ingres/lib/ingres.lib(abrtxio.obj)(.text+0x22c0):abrtxio.c: undefined reference to `_chkstk' /ingres/ingres/lib/ingres.lib(abrtxio.obj)(.text+0x2a65):abrtxio.c: undefined reference to `_chkstk' /ingres/ingres/lib/ingres.lib(abrtcall.obj)(.text+0x1546):abrtcall.c: undefined reference to `_chkstk' /ingres/ingres/lib/ingres.lib(abrtnqry.obj)(.text+0x1096):abrtnqry.c: undefined reference to `_chkstk' /ingres/ingres/lib/ingres.lib(abrtutil.obj)(.text+0x9):abrtutil.c: undefined reference to `_chkstk' /ingres/ingres/lib/ingres.lib(abrtrw.obj)(.text+0x485):abrtrw.c: more undefined references to `_chkstk' follow Unfortunately this is a proprietary product so I can't recompile ingres.lib with MinGW. The only thing that looks like _chkstk I can find is in libgcc.a but apparantly it doesn't want to get used and I can't figure out why(if it could be used at all). Another thing I tried was generating libingres.a using reimp and digging around in the DLL's that are supplied with Ingres. But the approach used here (rewriting commandlines) works best as far as I can tell. I hope somebody can shed some light on this. Gilgamesh Nootebos. |