msgpack unresolved question

Dan dbdavidson at yahoo.com
Thu Oct 25 11:50:54 PDT 2012


On Thursday, 25 October 2012 at 17:59:40 UTC, Jesse Phillips 
wrote:
>
> It is a linker error. You need to compile the msgpack.d file 
> and tell the linker where to find it. The simplest way is to 
> just throw the file on the command line.
>
> dmd compare_json.d msgpack.d
>

Thanks. I tried your suggestion but had no luck (same link 
error). It could be my command is still wrong. Or maybe it is 
something related to associative arrays? The reason I suggest 
this is there is another example in the directory (custom.d) 
which uses functionality in msgpack and builds and runs fine 
without my specifying msgpack.d on the command line.

Thanks
Dan

dmd  /.../msgpack-d/example/compare_json.d  
/.../msgpack-d/src/msgpack.d

compare_json.o: In function 
`_D7msgpack5Value83__T9toMsgpackTS7msgpack50__T6PackerTS3std5array16__T8AppenderTAhZ8AppenderZ6PackerZ9toMsgpackMxFNeKS7msgpack50__T6PackerTS3std5array16__T8AppenderTAhZ8AppenderZ6PackerZv':
/.../msgpack-d/src/msgpack.d:(.text._D7msgpack5Value83__T9toMsgpackTS7msgpack50__T6PackerTS3std5array16__T8AppenderTAhZ8AppenderZ6PackerZ9toMsgpackMxFNeKS7msgpack50__T6PackerTS3std5array16__T8AppenderTAhZ8AppenderZ6PackerZv+0x1aa): 
undefined reference to 
`_D6object55__T16AssociativeArrayTS7msgpack5ValueTxS7msgpack5ValueZ16AssociativeArray6lengthMFNdZm'
collect2: ld returned 1 exit status
--- errorlevel 1



More information about the Digitalmars-d-learn mailing list