[LLVMbugs] [Bug 6680] A dynamic link library (DLL) initialization routine failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 22 23:04:01 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6680
Anton Korobeynikov <asl at math.spbu.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |asl at math.spbu.ru
Resolution| |INVALID
Severity|release blocker |normal
--- Comment #3 from Anton Korobeynikov <asl at math.spbu.ru> 2010-03-23 01:04:01 CDT ---
You failed to link the DLL properly - you need to provide a proper mingw32 CRT
startup object and specify an entry point. So, you should additionally link in
dllcrt{1,2}.o from mingw32 runtime and use _DllMainCRTStartup at 12 as an entry
point (just -e _DllMainCRTStartup at 12).
It's better not to use mingw32-ld directly if you don't know precisely what is
necessary to link in and how. Consider using -shared option of llvm-gcc. The
following cmdline does everything for you and yields a working .dll:
llvm-gcc -shared tdll.c -o tdll.dll
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list