Unresolved Symbols in a nanovg Library

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 26 19:29:47 PDT 2016


On Thursday, 27 October 2016 at 02:12:34 UTC, Jason C. Wells 
wrote:
>  Error 42: Symbol Undefined _D2iv6nanovg3oui12__ModuleInfoZ

That means some module was imported but not compiled. You can run 
the `ddemangle` program that comes with dmd to translate it (or 
you'll get used to just reading it by eyeball - the pattern is 
_Dxyyy, repeated. The x is a number saying how long the next name 
is, and the yyy is the next part of the name. So 2iv6nanovg 
becomes iv.nanovg).

That means the iv.nanovg.oui was imported somewhere but not 
compiled in. The example surely uses it. ModuleInfo is 
auto-generated by the compiler for each module.

> I am quite surprised that arsd is looking for 
> iv\vfs\_something_.

ketmar and I semi-collaborate... our stuff is independent, but we 
know a number of more advanced tricks to selectively import if a 
file is available on the system.

So my jpeg.d (which was actually primarily authored by ketmar, 
well, he ported a C library and put an interface on top, then 
merged with my old jpg.d) will see if iv.vfs is available on the 
file system, and if it is, it will import it.

That works well if you just download a few files at a time (which 
is how I generally distribute my libs, I say "download file.d and 
other.d"), but if you downloaded *everything*, it will see it is 
there and try to show additional features.

But since you aren't compiling everything you have available, it 
sees it is there...but it isn't all built.



More information about the Digitalmars-d-learn mailing list