RES file not linking anymore with DMD v2.052

Ettienne ettienne.gilbert at gmail.com
Mon Apr 22 13:05:24 PDT 2013


On Monday, 22 April 2013 at 17:51:26 UTC, Rainer Schuetze wrote:
>
>
> On 22.04.2013 14:02, Ettienne Gilbert wrote:
>> Hi,
>>
>> I've finally gotten round to upgrading my DMD to v2.062 (from 
>> v2.059) -
>> running on Win XP.
>>
>> I've had no issues recompiling the (quite old) DFL library I 
>> use with
>> the latest DMD, so went on to rebuild a tool I previously 
>> developed
>> (that uses DFL). Everything compiled ok, but the linker choked 
>> on my RES
>> file. (This project build fine and worked perfectly on 
>> previous versions
>> of DMD up to and including v2.059). The error is:
>>
>> OPTLINK (R) for Win32  Release 8.00.12
>> Copyright (C) Digital Mars 1989-2010  All rights reserved.
>> http://www.digitalmars.com/ctg/optlink.html
>> atrchecker.RES(3) : Error 52: .DEF Syntax Error
>> DO
>
> I suspect your build script has somehow omitted a ',' from the 
> command line in its invocation of optlink. The usage is
>
> LINK obj[,out[,map[,lib[,def[,res]]]]]
>
> so if a comma misses, your resource file is interpreted as a 
> def file.
>
> If you are invoking the linker through dmd, you might want to 
> check the linker call by adding "-v" to the command line.

Hi Rainer,

I am actually using Visual-D (v0.3.35), so I've tested your idea 
by copying + pasting from .\Debug\<ProjectName>.buildlog.html 
into a batch file - and then building using this batch file 
rather than Visual-D.

And your hunch was spot on! If I modify the the linker invocation 
with an extra comma (i.e. as in ... 
"C:\dmd2\windows\lib\",,atrchecker.RES/NOMAP/CO/NOI 
/SUBSYSTEM:WINDOWS ..) it builds fine; without the extra comma it 
fails with the same error as before.

I suppose this is then a Visual-D issue and not a DMD linker 
issue, right?

Regards,
Ettienne


More information about the Digitalmars-d mailing list