From: Earnie B. <ear...@ya...> - 2003-05-09 15:52:43
|
Moore, Paul wrote: > From: Earnie Boyd [mailto:ear...@ya...] > >>>To elaborate on that, if you have access to "msvcr71.dll" you can: >>> >>>a. create an import library for this DLL (or take an existing one) and > > >>Well, modifying the top level Makefile.in to add a target msvcr71.def >>for the msvcrt.def.in dependency would work. > I did the above suggestion. Try the attached. > > I got a def file using pexports, and then a lib file via dlltool: > > pexports msvcr71.dll >msvcr71.def > dlltool --dllname msvcr71.dll --def msvcr71.def --output-lib libmsvcr71.a > > >>I wouldn't do that, just adding -lmsvcr71 to the link step would suffice. > > > Trying that, I got: > > C:> gcc -O2 -L. -lmsvcr71 -o hello.exe hello.c This for some reason uses abort, malloc and free from msvcrt.dll!! Probably because of one of the other libraries. This ``ld -o hello.exe hello.o /mingw/lib/crt2.o /mingw/lib/gcc-lib/mingw32/3.2.3/crtbegin.o -L/mingw/lib/gcc-lib/mingw32/3.2.3 -L/samo/mingw/bld/cygwin -L/mingw/lib -lmingw32 -lgcc -lmsvcr70 -lmingwex -luser32 -lkernel32'' resolved that problem. > ./libmsvcr71.a(ds00649.o)(.text+0x0): multiple definition of `atexit' > C:/Apps/Mingw/bin/../lib/gcc-lib/mingw32/3.2.2/../../../crt2.o > (.text+0x40):crt1.c: first defined here > ./libmsvcr71.a(ds00440.o)(.text+0x0): multiple definition of `_onexit' > C:/Apps/Mingw/bin/../lib/gcc-lib/mingw32/3.2.2/../../../crt2.o > (.text+0x60):crt1.c: first defined here > > I don't know if this is a problem with me trying to do something too > simple, or a fundamental issue... > I didn't have problems. Earnie. |