Linker Error: undefined reference to `internal'

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 10 12:52:35 PDT 2016


On 10/10/2016 12:23 PM, jython234 wrote:
> ld fails with this message:
>
> Linking...
> ../git/mango-engine/bin/libmango-engine.a(gl_model_503_284.o):(.data._D12mango_engine8graphics6opengl8gl_model7GLModel6__initZ+0x10):
> undefined reference to `internal'
> ../git/mango-engine/bin/libmango-engine.a(shader_51b_52f.o):
> (.data._D12mango_engine8graphics6shader13ShaderProgram6__initZ+0x18):
> undefined reference to `internal'
>
> I have no idea what this means, and have never seen it before.

A symbol remains undefined after all input files, including libraries, had been 
processed. Common causes for this are:

A function was called in your code, but the function was never written.

A virtual function was declared, but never written.

A data variable was referenced, but never defined anywhere.

Did not specify all the .obj files to the linker.

The calling conventions of the function being referenced do not match the 
calling conventions of the defined function. Compiler switches, memory models, 
and special keywords can all affect calling convention (and thereby the name of 
the symbol as it appears in the .obj file).

One or more missing library files (.lib). One way to figure out which .lib file 
contains the missing symbol is to run:

\dm\bin\grep symbolname \dm\lib\*.*

The LIB environment variable is missing or not pointing to the \dm\lib directory 
or wherever the .lib files reside.


More information about the Digitalmars-d mailing list