Incomprehensible compiler errors
Walter Bright
newshound2 at digitalmars.com
Mon Jul 30 14:40:20 PDT 2012
On 7/30/2012 9:31 AM, Stuart wrote:
> I'm trying to write an actual program in D, but no matter what I do I get stupid
> errors that mean nothing to me. (Reminds me of C++)
>
> Error 42: Symbol Undefined
> _D8infinity8standard7runtime4IApp4IApp11__InterfaceZ
This means module infinity, and standard.runtime.Iapp ...
> Huh? This usually happens if I omit the module statement at the top of EVERY
> DAMN FILE (why???) but in this case I haven't omitted it, yet I'm still getting
> the error.
It's likely that you aren't presenting the compiled version of inifinity.obj to
the linker.
> Also, I get the following error:
>
> Error 42: Symbol Undefined
> _D3dfl8internal6winapi12__ModuleInfoZ
>
> The code producing this second error is:
>
> int Run() {
> import core.sys.windows.windows;
> import dfl.internal.winapi;
> MSG msg;
> while (GetMessageA(&msg, null, 0, 0)) {
> TranslateMessage(&msg);
> DispatchMessageA(&msg);
> if (msg.hwnd && !IsWindow(msg.hwnd)) break;
> }
> return 0;
> }
>
> What the HELL is this "ModuleInfo", why is it necessary, why is it always
> missing when a "module" statement is not present, and why is it missing NOW?
A ModuleInfo is generated for each compiled module and inserted into its
corresponding .obj file. If the linker cannot find it, then it is likely that
you need to specify that .obj on the link command.
More information about the Digitalmars-d
mailing list