dmd 1.041 and 2.026 releases

Haruki Shigemori rayerd.wiz at gmail.com
Thu Mar 5 09:33:12 PST 2009


Don さんは書きました:
> On Windows, it compiles, but I can't get it to link. The errors are all 
> related to malloc-family functions.
> 
> ------------
> rmem.obj(rmem)  Offset 00111H Record Type 0091
>  Error 1: Previous Definition Different : ?strdup at Mem@@QAEPADPBD at Z (char 
> *syscall Mem::strdup(char const *))
> 
> --- and so on for the other Mem functions, all from rmem.obj.
> 
> tk.obj(tk)
>  Error 42: Symbol Undefined ?mem_free@@YAXPAX at Z (void cdecl 
> mem_free(void *))
> 
> -- and so on, all the malloc functions from tk.obj.
> 
> e2ir.obj(e2ir)
>  Error 42: Symbol Undefined ?mem_fcalloc@@YAPAXI at Z (void *cdecl 
> mem_fcalloc(unsi
> gned ))
> cgobj.obj(cgobj)
>  Error 42: Symbol Undefined ?mem_realloc@@YAPAXPAXI at Z (void *cdecl 
> mem_realloc(v
> oid *,unsigned ))
> -----------

1. Edit win32.mak like this:

--- win32.mak.default	Thu Mar 05 01:53:36 2009
+++ win32.mak	Thu Mar 05 23:06:02 2009
@@ -6,6 +6,6 @@

-D=
+D=c:\d
  SCROOT=$D\dm
  INCLUDE=$(SCROOT)\include
-CC=\dm\bin\dmc
+CC=c:\d\dm\bin\dmc
  LIBNT=$(SCROOT)\lib
@@ -14,2 +14,3 @@
  CP=cp
+SC=c:\d\dm\bin\sc.exe

@@ -153,3 +154,3 @@
  $(TARGET).exe : $(OBJS) win32.mak
-	sc -o$(TARGET).exe $(OBJS) -cpp -mn -Ar $(LFLAGS)
+	$(SC) -o$(TARGET).exe $(OBJS) -cpp -mn -Ar $(LFLAGS)

@@ -169,3 +170,3 @@
  msgsx.exe : msgsx.c
-	sc msgsx -mn -D$(TARGET) $(DEFINES) $(WINLIBS)
+	$(SC) msgsx -mn -D$(TARGET) $(DEFINES) $(WINLIBS)

@@ -173,3 +174,3 @@
  	$C\cdef.h $C\cc.h $C\oper.h $C\ty.h $C\optabgen.c
-	sc -cpp -ooptabgen.exe $C\optabgen -DMARS -I$(TK) $(WINLIBS) #-L$(LINKS)
+	$(SC) -cpp -ooptabgen.exe $C\optabgen -DMARS -I$(TK) $(WINLIBS) 
#-L$(LINKS)
  	optabgen
@@ -181,3 +182,3 @@
  id.h id.c : idgen.c
-	sc -cpp idgen
+	$(SC) -cpp idgen
  	idgen

2. Remove old dmd and dmc folders.

3. Extract dmd.zip and dmc.zip.
    You got link errors because you over-wrote to old folders.

4. Enjoy your dmd!


More information about the Digitalmars-d-announce mailing list