www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - dmd v0.94

reply Regan Heath <regan netwin.co.nz> writes:
Unzip the attached zip and run doit.cmd (if you're on windows, if not 
compile all .d files and link them) the error reported is:

D:\D\src\build\temp\a>doit
D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
_D4hash18digestStringT_G16h13digestStr
ingTFG16hZAa
--- errorlevel 1

I believe what is happening is that md4 and md5 both create an instance of 
the code in digestStringT needed to process a ubyte[16] and they then 
collide upon linking.

Help!

Regan.

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 02 2004
next sibling parent reply J C Calvarese <jcc7 cox.net> writes:
In article <opsaiglfdb5a2sq9 digitalmars.com>, Regan Heath says...
------------kvDqzFtSa4vbkwNmbsoA8z
Content-Type: text/plain; format=flowed; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

Unzip the attached zip and run doit.cmd (if you're on windows, if not 
compile all .d files and link them) the error reported is:

D:\D\src\build\temp\a>doit
D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
_D4hash18digestStringT_G16h13digestStr
ingTFG16hZAa
--- errorlevel 1

I believe what is happening is that md4 and md5 both create an instance of 
the code in digestStringT needed to process a ubyte[16] and they then 
collide upon linking.

Help!

Regan.
I agree that you seem to have found some sort of compiler or linker error, but did you realize there's a work-around? I compiled them all at once like this: dmd main.d hash.d md4.d md5.d This is my result: c:\dmd\bin\..\..\dm\bin\link.exe main+hash+md4+md5,,,user32+kernel32/noi; 00000000000000000000000000000000 d41d8cd98f00b204e9800998ecf8427e 00000000000000000000000000000000 DONE main (I don't know whether it's right or not, but it doesn't generate any errors.) jcc7
Jul 02 2004
parent Regan Heath <regan netwin.co.nz> writes:
On Fri, 2 Jul 2004 19:42:49 +0000 (UTC), J C Calvarese <jcc7 cox.net> 
wrote:

 In article <opsaiglfdb5a2sq9 digitalmars.com>, Regan Heath says...
 ------------kvDqzFtSa4vbkwNmbsoA8z
 Content-Type: text/plain; format=flowed; charset=iso-8859-15
 Content-Transfer-Encoding: 8bit

 Unzip the attached zip and run doit.cmd (if you're on windows, if not
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different :
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an instance 
 of
 the code in digestStringT needed to process a ubyte[16] and they then
 collide upon linking.

 Help!

 Regan.
I agree that you seem to have found some sort of compiler or linker error, but did you realize there's a work-around?
No.
 I compiled them all at once like this:
 dmd main.d hash.d md4.d md5.d
Ahh of course.. so the bug only occurs when compiling seperately.
 This is my result:
 c:\dmd\bin\..\..\dm\bin\link.exe main+hash+md4+md5,,,user32+kernel32/noi;
 00000000000000000000000000000000
 d41d8cd98f00b204e9800998ecf8427e
 00000000000000000000000000000000
 DONE  main

 (I don't know whether it's right or not, but it doesn't generate any 
 errors.)
It's right, all the code to actually make a digest was removed from that sample. Thanks for this. Regan -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 02 2004
prev sibling parent reply =?ISO-8859-15?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Yes, I've seen this same problem happening with template instance when 
the files where compiled separately.

The solution is either alias instances of the template in one file and 
use only the aliases or compile all files at the same time.

Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:
 
 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1
 
 I believe what is happening is that md4 and md5 both create an instance 
 of the code in digestStringT needed to process a ubyte[16] and they then 
 collide upon linking.
 
 Help!
 
 Regan.
 
-- Julio CÚsar Carrascal Urquijo
Jul 02 2004
next sibling parent Regan Heath <regan netwin.co.nz> writes:
On Fri, 02 Jul 2004 15:37:05 -0500, Julio CÚsar Carrascal Urquijo 
<adnoctum phreaker.net> wrote:

 Yes, I've seen this same problem happening with template instance when 
 the files where compiled separately.

 The solution is either alias instances of the template in one file and 
 use only the aliases
I think I'll do this. Thanks.
 or compile all files at the same time.
Yeah.. JC told me this too. Thanks for your help, Regan
 Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an instance 
 of the code in digestStringT needed to process a ubyte[16] and they 
 then collide upon linking.

 Help!

 Regan.
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 02 2004
prev sibling parent reply Regan Heath <regan netwin.co.nz> writes:
On Fri, 02 Jul 2004 15:37:05 -0500, Julio CÚsar Carrascal Urquijo 
<adnoctum phreaker.net> wrote:

 Yes, I've seen this same problem happening with template instance when 
 the files where compiled separately.

 The solution is either alias instances of the template in one file and 
 use only the aliases or compile all files at the same time.
I just tried to do this with this example, I cannot seem to get it to work, can you show me how? Perhaps by changing my example and reposting it? Thanks, Regan
 Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an instance 
 of the code in digestStringT needed to process a ubyte[16] and they 
 then collide upon linking.

 Help!

 Regan.
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 03 2004
parent Regan Heath <regan netwin.co.nz> writes:
On Sun, 04 Jul 2004 12:31:33 +1200, Regan Heath <regan netwin.co.nz> wrote:

 On Fri, 02 Jul 2004 15:37:05 -0500, Julio CÚsar Carrascal Urquijo 
 <adnoctum phreaker.net> wrote:

 Yes, I've seen this same problem happening with template instance when 
 the files where compiled separately.

 The solution is either alias instances of the template in one file and 
 use only the aliases or compile all files at the same time.
I just tried to do this with this example, I cannot seem to get it to work, can you show me how? Perhaps by changing my example and reposting it?
I'm so slow sometimes.. I have worked it out, thanks for this idea. Regan
 Thanks,
 Regan

 Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an 
 instance of the code in digestStringT needed to process a ubyte[16] 
 and they then collide upon linking.

 Help!

 Regan.
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 03 2004