www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Something wrong with dmd's -c command?

Response file:

dmd.rsp:
compile.d
ignored.d
main.d
parse.d
serialize.d
types.d
util.d
xml.d
ae\utils\xml.d
ae\utils\xmlrpc.d
gen\common.d
gen\typemaps.d
gen\types.d
gen\generator.d
gen\util.d
messagepack\msgpack.d
-ofdoxy.exe

$ dmd  dmd.rsp

OK, exe is built (win32). Now let's try compiling module-by-module via
-c and then linking:

make.bat:
 echo off
dmd -c -I.. -ofcompile.obj compile.d
dmd -c -I.. -ofignore.obj ignored.d
dmd -c -I.. -ofmain.obj main.d
dmd -c -I.. -ofparse.obj parse.d
dmd -c -I.. -ofserialize.obj serialize.d
dmd -c -I.. -oftypes.obj types.d
dmd -c -I.. -ofutil.obj util.d
dmd -c -I.. -ofxml.obj xml.d
dmd -c -I.. -ofae_utils_xml.obj ae\utils\xml.d
dmd -c -I.. -ofae_utils_xmlrpc.obj ae\utils\xmlrpc.d
dmd -c -I.. -ofgen_common.obj gen\common.d
dmd -c -I.. -ofgen_typemaps.obj gen\typemaps.d
dmd -c -I.. -ofgen_types.obj gen\types.d
dmd -c -I.. -ofgen_generator.obj gen\generator.d
dmd -c -I.. -ofgen_util.obj gen\util.d
dmd -c -I.. -ofmsgpack.obj messagepack\msgpack.d

dmd compile.obj ignore.obj main.obj parse.obj serialize.obj types.obj
util.obj xml.obj ae_utils_xml.obj ae_utils_xmlrpc.obj gen_common.obj
gen_typemaps.obj gen_types.obj gen_generator.obj gen_util.obj
msgpack.obj

OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
main.obj(main)
 Error 42: Symbol Undefined
_D6object54__T16AssociativeArrayTAyaTxS9doxyparse5types8VariableZ16Associat=
iveArray6lengthMFNdZk
main.obj(main)
 Error 42: Symbol Undefined
_D6object58__T16AssociativeArrayTAyaTxS9doxyparse5types11FuncTypedefZ16Asso=
ciativeArray6lengthMFNdZk
main.obj(main)
 Error 42: Symbol Undefined
_D6object53__T16AssociativeArrayTAyaTxS9doxyparse5types7TypedefZ16Associati=
veArray6lengthMFNdZk
main.obj(main)
 Error 42: Symbol Undefined
_D6object52__T16AssociativeArrayTAyaTxS9doxyparse5types6DefineZ16Associativ=
eArray6lengthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object29__T16AssociativeArrayTAyaTxiZ16AssociativeArray6lengthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object29__T16AssociativeArrayTkTxAyaZ16AssociativeArray6lengthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object29__T16AssociativeArrayTAyaTxkZ16AssociativeArray6lengthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object112__T16AssociativeArrayTAyaTxS9doxyparse5t=F1=A5=B3=B51=04=CE=B2F=
unctionBaseVE=10=C5=80=CA=A0T=03=CF=B1Z=0E=D1=9A=12?engthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object50__T16AssociativeArrayTAyaTxS9doxyparse5types4EnumZ16AssociativeA=
rray6lengthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object32__T16AssociativeArrayTAyaTxAAyaZ16AssociativeArray6lengthMFNdZk
xml.obj(xml)
 Error 42: Symbol Undefined
_D6object112__T16AssociativeArrayTAyaTxS9doxyparse5t=F1=A5=B3=B51=04=CE=B2F=
unctionBaseVE=10=C5=80=CA=A0T=03=CF=B0Z=0E=D1=9A=12?engthMFNdZk
--- errorlevel 11
Exit code: 11

All of these seem related to associative arrays. If you demangle one of the symbols via std.demangle it becomes: property uint object.AssociativeArray!(immutable(char)[], const(doxyparse.types.FuncTypedef)).AssociativeArray.length() I can tell this is needed for the following symbol in my 'doxyparse.types' module: struct Member { FuncTypedef[string] funcTypedefs; } FuncTypedef is defined as: struct FuncTypedef { string ID; string name; string type; string[] parameters; string returnType; } There is nothing in the directory up from the current folder (-I..) except the base folder of the project, so I don't think DMD is picking up modules from unrelated directories. I can't test with older versions of DMD because my project then ICEs. I'd try with GDC, but apparently GDC has .length set as a ulong even though I'm running x86, so I get compilation errors there. I'll have to reduce this to make a test-case.. but has anyone had issues like these before?
Mar 25 2012