A89: C Undefined Reference Errors


[Prev][Next][Index][Thread]

A89: C Undefined Reference Errors



Can someone help me. I modified my simple C program a little bit (included 
below), and now it won't compile. It did yesterday, but now it won't. The 
linker for tigcc brings up all kinds of "undefined reference" errors. I put 
all of the patches that came with TIGCCLIB in the same directory as my 
program (I heard that if you get undefined reference errors, you should put 
the files from the "patches" folder into the same folder as the program 
you're compiling). Does anyone who what I can do to fix this? Thanks.

        Josh
        <A HREF="http://pa.ticalc.org">Programmers Anonymous</A> Member
#define RETURN_VALUE
#include <nostub.h>
#include <timath.h>
#include <estack.h>
#include <string.h>
#include <alloc.h>
#include <args.h>


int _ti89;



void _main(void)
{


int n=1,a=1,num=0,count=0;
int mats[1000];
float b=1;

ESI argptr=top_estack;
n=GetIntArg(argptr);


label_a:
        b=n/a;
        if(0!=b-trunc(floor(flt(b))))
        goto label_b;

        mats[num]=a;
        ++num;
        if(a!=b)
                {
                mats[num]=b;
                ++num;
                }

        label_b:
        a++;
        if(a>trunc(floor(sqrt(flt(n)))))
                {
                push_END_TAG();
                for(count=num-1;count>=0;count--)
                        {
                        push_longint(mats[count]);
                        }

                push_LIST_TAG();
                return;
                }
        goto label_a;
        }