Missing Template Symbols

Jacob Carlborg doob at me.com
Wed Apr 27 01:59:00 PDT 2011


On 2011-04-27 05:58, Andrew Wiley wrote:
> I've tried to start building my project with xfbuild today (running
> everything through DMD was finally starting to get slow), and every so
> often, Optlink dies with something like this:
> OPTLINK (R) for Win32  Release 8.00.8
> Copyright (C) Digital Mars 1989-2010  All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
>   Error 42: Symbol Undefined
> _D3std11concurreéy83__T6_spawnTOC9dinecraft5world7backenÿd12W€„—B€†ŽTS€‘Ð3TidZ€‡ÐFbPF€°Ó€—Òv€ÇÈ€–—
> .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
>   Error 42: Symbol Undefined
> _D3std11concurreéy59__T5_sendTOC9dinecraft5world7back€ƒ›6bridge13ChunkResponseZ€†¸FS€‘Ö3Tid€±Îv
> .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
>   Error 42: Symbol Undefined
> _D3std11concurreéy60__T5_sendTOC9dinecraft5world7back€ƒ›6bridge14PlayerResponseZ€†¹FS€‘×3Tid€²Ïv
> .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
>   Error 42: Symbol Undefined
> _D3std11concurrency262__T8checkopsTDFOC9dinecraft6global11StopMessageZvTDFOC9dinecraft5world7bac16BA63AB4F5238EB56B8A073CCF850BC
> .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
>   Error 42: Symbol Undefined
> _D3std11concurrency10MessageBox257__T3getTDFOC9dinecraft6global11StopMessageZvTDFOC9dinecraft5wo153D92039F751A809C20E14F769954BC
> .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
>   Error 42: Symbol Undefined
> _D3std11concurreéy75__T6_spawnTOC9dinecraft5world3gen8€…Š€„‰W€„‰GenTS€‘È3TidZ€‡ÈFbPF€¨Ë€—Êv€¿À€–—
> .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
>   Error 42: Symbol Undefined
> _D3std4conv62__T6toImplTAyaTC9dinecraft5world7backend6bridge12ChunkRequestZ€‡»F€®·x€ƒêZÚ
> .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
>   Error 42: Symbol Undefined
> _D3std11concurreéy102__T8checkopsTDFOC9dinecraft5world7backend6bridge12ChunkRequestZv€�´6global11StopMessageZvZ€‰ãF€³ã€¥âv
> .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
>   Error 42: Symbol Undefined
> _D3std11concurreéy10MessageBox97__T3getTDFOC9dinecraft5world7backend6bridge12ChunkRequestZv€�´6global11Stop€‡ãZvZ€„ÞMF€³ß€¥Þb
>
> To me, this looks like I'm somehow missing template implementations.
> When I delete all the object files and build again, everything generally
> works. Is there any reason this happens and/or a way to fix it?

I think this is because DMD only output templates to one object file 
instead of to all object files. In addition to that there's now way to 
tell DMD or know in which object file it will output the templates.

I think Walter has said that DMD will output templates to all object 
files if you compile with the -lib switch. You can try and see if you 
can modify xfbuild to use the -lib switch.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list