From: <sbe...@mi...> - 2001-06-26 11:26:06
|
Short version: Isn't dllcrt1.o or dllcrt2.o supposed to be automatically linked by dllwrap/dlltool when building a DLL? It isn't on my system. How do I make it so? Long version: I'm trying to build CD-DA X-Tractor (http://sourceforge.net/projects/xtractor/) which uses dllwrap. This is my first exposure to dllwrap. When I try to build the DLLs I get a linker warning: "cannot find entry symbol _DllMainCRTStartup@12". This function is located in dllcrt1.o and dllcrt2.o (which cksum to be identical). Shouldn't one of these files be linked automatically when building a DLL? Is there some environment flag or something which needs to be set? By the way, what's the difference between these two files? Using: dllwrap version 2.11.90 gcc version 3.79.1 make version 3.79.1 NT 4.0 (I forget which SP) Makefile: -------------------------------------------------------------- # Makefile for cdcache.dll # using gcc 2.95.2(Mingw32) from # http://www.xraylith.wisc.edu/~khan/software/gnu-win32/gcc.html # rm and cp are available in the Virtually Unix archive # http://www.itribe.net/virtunix RM = rm -f CP = cp #release build CFLAGS = -O0 -Wall -g CPPFLAGS = -O0 -Wall -g LFLAGS = #full symbolic debugging under GDB & OutputDebugString #CFLAGS = -O0 -ggdb -D_DEBUG #CPPFLAGS = -O0 -ggdb -D_DEBUG #LFLAGS = -g DLLNAME = cdcache DLL = $(DLLNAME).dll LIBDLL = lib$(DLLNAME).a CC = gcc CPP = g++ WINDRES = windres DLLTOOL = dlltool DLLWRAP = dllwrap #WRAPOPT = --dllname $(DLL) -def $(DLLNAME).def --target i386- mingw32 --implib $(LIBDLL) --entry _DllMain@12 WRAPOPT = --dllname $(DLL) -def $(DLLNAME).def --target i386- mingw32 --implib $(LIBDLL) OBJ = growstring.o parsecddb.o all: $(DLLNAME).dll test.exe clean: $(RM) *.o *~ *.dll base.tmp junk.tmp *.a temp.exp %.o : %.cpp $(CPP) $(CFLAGS) -D_MAKING_DLL -c $< -o $@ $(DLLNAME).dll: $(OBJ) $(DLLNAME).def $(RM) $(LIBDLL) $(DLLWRAP) $(WRAPOPT) $(OBJ) # $(DLLWRAP) $(WRAPOPT) $(OBJ) dllcrt1.o #$(DLLNAME)rc.o: $(DLLNAME).rc # $(WINDRES) -i $< -o $@ test.exe: test.c $(LIBDLL) $(CC) -g -o test.exe test.c $(LIBDLL) ---------------------------------------------------------- --TIA, Stephen Behnfeldt |