March 12, 2005
On Fri, 11 Mar 2005 22:41:17 -0800, John Reimer wrote:

> J C Calvarese wrote:
>> Walter wrote:
>> 
>>> Cleaning out the attic of lots of minor bug fixes.
>>>
>>> http://www.digitalmars.com/d/changelog.html
>> 
>> 
>> Such as
>> #  Added pragma(lib, "library name");
>> Hip. Hip. Hooray! I think a few people have requested this. ;)
> 
> This is great.  One less thing for Derek's build to worry about.  I'm a little surprised, though, that it suddenly showed up in dmd.  Walter showed no indication of adding this pragma, unless I missed a post somewhere.  Maybe he just found Derek's build utility /too/ handy! ;-)
> 
> -JJR

Well, DMD only supports library linkages this way, but build still supports library *and* object files.

  version(build) pragma(link, "somefile.obj");

  version(build) pragma(link, "libone.lib", "libtwo.lib");

;-)

-- 
Derek Parnell
Melbourne, Australia
12/03/2005 5:49:38 PM
March 12, 2005
Derek Parnell wrote:
> On Fri, 11 Mar 2005 22:41:17 -0800, John Reimer wrote:
> 
> 
>>J C Calvarese wrote:
>>
>>>Walter wrote:
>>>
>>>
>>>>Cleaning out the attic of lots of minor bug fixes.
>>>>
>>>>http://www.digitalmars.com/d/changelog.html
>>>
>>>
>>>Such as
>>>#  Added pragma(lib, "library name");
>>>Hip. Hip. Hooray! I think a few people have requested this. ;)
>>
>>This is great.  One less thing for Derek's build to worry about.  I'm a little surprised, though, that it suddenly showed up in dmd.  Walter showed no indication of adding this pragma, unless I missed a post somewhere.  Maybe he just found Derek's build utility /too/ handy! ;-)
>>
>>-JJR
> 
> 
> Well, DMD only supports library linkages this way, but build still supports
> library *and* object files.
> 
>   version(build) pragma(link, "somefile.obj");
> 
>   version(build) pragma(link, "libone.lib", "libtwo.lib");
> 
> ;-)
> 

Yes, build is still clearly superior. 8^D
March 12, 2005
"John Reimer" <brk_6502@yahoo.com> wrote in message news:d0u2uf$1jnk$1@digitaldaemon.com...
> J C Calvarese wrote:
> > Walter wrote:
> >
> >> Cleaning out the attic of lots of minor bug fixes.
> >>
> >> http://www.digitalmars.com/d/changelog.html
> >
> >
> > Such as
> > #  Added pragma(lib, "library name");
> > Hip. Hip. Hooray! I think a few people have requested this. ;)
>
> This is great.  One less thing for Derek's build to worry about.  I'm a little surprised, though, that it suddenly showed up in dmd.  Walter showed no indication of adding this pragma, unless I missed a post somewhere.  Maybe he just found Derek's build utility /too/ handy! ;-)

It's been in DMC++ forever. I just hadn't gotten around to putting it in DMD before.


March 12, 2005
Andrew Fedoniouk wrote:

> And one more: do you have public bugs DB access?
> I mean to take a look on what is "Fixed D.bugs/1795".

Look at:
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/1795

Maybe Walter can make these references into proper links ?


Also, the link in the announcements should be:
http://www.digitalmars.com/d/changelog.html#new0117

This will make them more useful, in the future...

--anders
March 12, 2005
Walter wrote:

> Cleaning out the attic of lots of minor bug fixes.
> 
> http://www.digitalmars.com/d/changelog.html

This new DMD release fails to build Phobos...

> gcc -o unittest unittest.o libphobos.a -lpthread -lm -g
> libphobos.a(gc.o)(.gnu.linkonce.tgc_init+0x47): In function `gc_init':
> : undefined reference to `_D3std2gc7gc_init6Thread11thread_initFZv'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx2GC6mallocFkZPv+0x1a): In function `_D3gcx2GC6mallocFkZPv':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread8nthreadsk'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx2GC12mallocNoSyncFkZPv+0x72): In function `_D3gcx2GC12mallocNoSyncFkZPv':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread8nthreadsk'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0x15): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread8pauseAllFZv'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0xeb): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread6getAllFZAC3std6thread6Thread'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0x147): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread6getESPFZPv'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0x6b9): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread9resumeAllFZv'
> collect2: ld returned 1 exit status

Both without -release (for my debugging version)
and with -unittest (for running the unit test)

--anders
March 12, 2005
Walter wrote:

>>i'm not sure if i got the new version, because the command line still
>>says 'DMD .116' though i did get it from
>>ftp://ftp.digitalmars.com/dmd.117.zip
> 
> Forgot to copy the linux one in, fixed now.

Maybe there should be some kind of "release candidate"
procedure to the new zipfiles ? Or do we have to give
the MD5SUM of the zip of the DMD version we're using ? ;-)

"Fixed now" seems to imply it was changed *after* release ?

--anders

PS.
http://www.algonet.se/~afb/d/diffs/dmd.listing
http://www.algonet.se/~afb/d/diffs/dmd.md5sum
March 12, 2005
Walter wrote:

> Cleaning out the attic of lots of minor bug fixes.
> 
> http://www.digitalmars.com/d/changelog.html

This new DMD release fails to build Phobos...

> gcc -o unittest unittest.o libphobos.a -lpthread -lm -g
> libphobos.a(gc.o)(.gnu.linkonce.tgc_init+0x47): In function `gc_init':
> : undefined reference to `_D3std2gc7gc_init6Thread11thread_initFZv'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx2GC6mallocFkZPv+0x1a): In function `_D3gcx2GC6mallocFkZPv':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread8nthreadsk'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx2GC12mallocNoSyncFkZPv+0x72): In function `_D3gcx2GC12mallocNoSyncFkZPv':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread8nthreadsk'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0x15): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread8pauseAllFZv'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0xeb): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread6getAllFZAC3std6thread6Thread'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0x147): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread6getESPFZPv'
> libphobos.a(gcx.o)(.gnu.linkonce.t_D3gcx3Gcx11fullcollectFPvZk+0x6b9): In function `_D3gcx3Gcx11fullcollectFPvZk':
> : undefined reference to `_D3gcx2GC12mallocNoSync6Thread9resumeAllFZv'
> collect2: ld returned 1 exit status

Both without -release (for my debugging version)
and with -unittest (for running the unit test)

--anders
March 12, 2005
>> one question, though. why doesn't the compiler stop compiling when it gives me warnings? shouldn't warnings just warn and still compile?
>
> The warnings cause the compiler to stop with a non-zero exit code for
> those
> who do automated builds. If it didn't, they'd miss the warnings as the
> scroll off the screen.

That effectively makes all warnings into errors which is very different than just showing warnings and letting the user do what they want to. Capturing output so that it doesn't scroll off the screen is covered in programming 101 so I would assume people can deal with multiple comments.


March 12, 2005
"Walter" <newshound@digitalmars.com> wrote in message news:d0tn63$18an$1@digitaldaemon.com...
> Cleaning out the attic of lots of minor bug fixes.
>
> http://www.digitalmars.com/d/changelog.html

I'm getting about 50 or warnings now when compiling MinWin about duplicate definitions of an function template I'm using in different modules. It only seems to happen when the function parameters use the template parameter. I've boiled it down to the following example:

mod1.d:
struct Foo(T) {
  void foo(T arg) { }
}

mod2.d
import mod1;
void bar2() {
  Foo!(int) w;
}

mod3.d:
import mod1;
void bar3() {
  Foo!(int) w;
}

I run dmd -c mod1.d and then mod2 and mod3 and then try to link together:
C:\d>lib -c mod1.lib mod1.obj mod2.obj mod3.obj
Digital Mars Librarian Version 8.00n
Copyright (C) Digital Mars 2000-2002 All Rights Reserved www.digitalmars.com
Warning: Public '_D4mod15Foo_i3Foo3fooFiZv' already in library, redefinition
ign
ored.
Digital Mars Librarian complete.

Multiply this warning by 50 and you get MinWin. :-P


March 12, 2005
"Ben Hinkle" <ben.hinkle@gmail.com> wrote in message news:d0us2f$2kmj$1@digitaldaemon.com...
>
> "Walter" <newshound@digitalmars.com> wrote in message news:d0tn63$18an$1@digitaldaemon.com...
>> Cleaning out the attic of lots of minor bug fixes.
>>
>> http://www.digitalmars.com/d/changelog.html
>
> I'm getting about 50 or warnings now when compiling MinWin about duplicate definitions of an function template I'm using in different modules. It only seems to happen when the function parameters use the template parameter.

I should add when I try to use the resulting lib in an app it errors - for now I have to revert back to dmd.116