[Main]
Title=Why do I get "Undefined Reference to..." errors?

[Top]
<TABLE CELLPADDING="4"><TR><TD VALIGN="TOP"><B>Q:</B></TD><TD>
When I tried to compile my program, the linker reports to me
<PRE>Undefined reference to&nbsp;...</PRE>
although my program seems correct. What's a problem?
</TD></TR><TR><TD VALIGN="TOP"><B>A:</B></TD><TD>
In earlier releases of TIGCC (before 0.9) this usually meant that you need to include
some patches in your program. As TIGCC now does it automatically, if you still have an
undefined reference error, that either something is wrong with your
program (more probably you used a function which is not defined elsewhere, maybe due to
typing error), or you used something which is not implemented yet in TIGCC (which is probably
true if you got an undefined reference to a symbol which begins which the double underscore
<CODE>'__'</CODE>). For example, although
TIGCC supports very long (64-bit) integers (<CODE>'long&nbsp;long'</CODE> type, which is a
<A HREF="$$INFOLINK(gnuexts)">GNU C extension</A>), the support for multiplying and dividing double
longs is not supported yet. For example, if you try to divide two double-long numbers, you
will get an undefined reference to <CODE>'__udivdi3'</CODE>. Sorry, there is no simple help
for this. You must live without 64-bit division for now. It will be implemented in
the future.
</TD></TR></TABLE>
