www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.boxer useless

reply Tim Starling <t.starling physics.unimelb.edu.au> writes:
I know this has been reported before, e.g.

http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4444.html

but I thought some agitation might be required. What exactly is the point of
std.boxer if you can't link to it without -release? I'd rather forget about
std.boxer and find some other workaround, than throw away all D's testing
and debugging features.

Can't you just package two versions of phobos.lib, one compiled with
-release and one not? Then hack dmd to link the right one?

-- Tim Starling


import std.boxer;

int main()
{
	// Convert the integer 45 into a box.
    Box b = box(45);

    // Recover the integer and cast it to real.
    real r = unbox!(real)(b);

	return 0;
}

$ dmd
Digital Mars D Compiler v0.138
[...]

$ dmd boxtest.d
c:\dmd\bin\..\..\dm\bin\link.exe boxtest,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

boxtest.obj(boxtest)
 Error 42: Symbol Undefined _assert_3std5boxer
--- errorlevel 1
Nov 06 2005
next sibling parent Vathix <chris dprogramming.com> writes:
On Sun, 06 Nov 2005 21:36:15 -0500, Tim Starling  
<t.starling physics.unimelb.edu.au> wrote:

 I know this has been reported before, e.g.

 http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4444.html

 but I thought some agitation might be required. What exactly is the  
 point of
 std.boxer if you can't link to it without -release? I'd rather forget  
 about
 std.boxer and find some other workaround, than throw away all D's testing
 and debugging features.

 Can't you just package two versions of phobos.lib, one compiled with
 -release and one not? Then hack dmd to link the right one?
Plus there's a quasi mode when neither -debug nor -release are used; more link issues.
Nov 06 2005
prev sibling next sibling parent reply David L. Davis <SpottedTiger yahoo.com> writes:
In article <dkmeiv$1o5g$1 digitaldaemon.com>, Tim Starling says...
I know this has been reported before, e.g.

http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4444.html

but I thought some agitation might be required. What exactly is the point of
std.boxer if you can't link to it without -release? I'd rather forget about
std.boxer and find some other workaround, than throw away all D's testing
and debugging features.

Can't you just package two versions of phobos.lib, one compiled with
-release and one not? Then hack dmd to link the right one?

-- Tim Starling


import std.boxer;

int main()
{
	// Convert the integer 45 into a box.
    Box b = box(45);

    // Recover the integer and cast it to real.
    real r = unbox!(real)(b);

	return 0;
}

$ dmd
Digital Mars D Compiler v0.138
[...]

$ dmd boxtest.d
c:\dmd\bin\..\..\dm\bin\link.exe boxtest,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

boxtest.obj(boxtest)
 Error 42: Symbol Undefined _assert_3std5boxer
--- errorlevel 1
Tim Starling, Burton Radons gave a one liner (as used below) which does allow std.boxer unittesting in one of his posted a month or so back (I don't have the link handy at the moment). Hopefully you'll find this small example code helpful. Output: --------- C:\dmd>dmd boxunittest.d -debug=test -unittest C:\dmd\bin\..\..\dm\bin\link.exe boxunittest,,,user32+kernel32/noi; C:\dmd>boxunittest (unittest) boxx=1.234e+15+4.56e+07i (main) boxx=1.234e+15+4.56e+07i C:\dmd>dmd boxunittest.d -release C:\dmd\bin\..\..\dm\bin\link.exe boxunittest,,,user32+kernel32/noi; C:\dmd>boxunittest (main) boxx=1.234e+15+4.56e+07i C:\dmd> David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Nov 06 2005
parent reply Tim Starling <t.starling physics.unimelb.edu.au> writes:
David L. Davis wrote:

Thanks for the tip, but I hope the existence of a workaround like this won't delay the implementation of a fix. Or if there is no intention to fix it, could the workaround above be documented in the manual? -- Tim Starling
Nov 06 2005
next sibling parent David L. Davis <SpottedTiger yahoo.com> writes:
In article <dkmrva$21bt$1 digitaldaemon.com>, Tim Starling says...
David L. Davis wrote:

Thanks for the tip, but I hope the existence of a workaround like this won't delay the implementation of a fix. Or if there is no intention to fix it, could the workaround above be documented in the manual? -- Tim Starling
Here's the thread that this tip pops up in, just look at the next to last message posted. In which it appears that Burton Radons has given Walter this fix for std.boxer, and that he was hoping to see it in dmd v0.130. So, I guess giving Walter a friendly reminder on this issue would help in moving this fix in sooner, rather than later. <g> David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Nov 07 2005
prev sibling next sibling parent David L. Davis <SpottedTiger yahoo.com> writes:
In article <dkmrva$21bt$1 digitaldaemon.com>, Tim Starling says...
David L. Davis wrote:

Thanks for the tip, but I hope the existence of a workaround like this won't delay the implementation of a fix. Or if there is no intention to fix it, could the workaround above be documented in the manual? -- Tim Starling
opps! Here's the link: http://www.digitalmars.com/d/archives/digitalmars/D/learn/1661.html David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Nov 07 2005
prev sibling parent Tomás Rossi <Tomás_member pathlink.com> writes:
In article <dkmrva$21bt$1 digitaldaemon.com>, Tim Starling says...
David L. Davis wrote:

Thanks for the tip, but I hope the existence of a workaround like this won't delay the implementation of a fix. Or if there is no intention to fix it, could the workaround above be documented in the manual? -- Tim Starling
I agree! Tom
Nov 07 2005
prev sibling parent Sean Kelly <sean f4.ca> writes:
I ran into this problem with Ares.  std.boxer should be compiled in 
debug mode into Phobos.  The alternative is, as you suggest, to supply 
both release and debug versions of Phobos.


Sean
Nov 06 2005