[A89] Re: multiple .c files


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

[A89] Re: multiple .c files




How i do it:
I have a file that has the function DrawBG(int x, int y, ...) and the file 
is called gfx.h, so i do this

#include <tigcclib.h>
#include "gfx.h"

And it's included, i wouldn't include it as a .c, but as a .h, or define it 
as a header file. But, it's up to you.

At 3/14/2001 10:14 AM, you wrote:

>How exactly do you separate your code into multiple files?  It seems to 
>almost work if you give a
>complete path to the file (#include "C:\\Program Files\\...shot.c"), but 
>then errors appear in the
>compilation of the shot.c file, making it look like the TIGCC header files 
>are no longer included
>(stuff like undefined function reference, LCD_WIDTH undeclared, etc.)  If 
>I include tigcclib in
>only one of the two c files that I have other than the main program one, 
>it fixes all of the
>errors from that file, but they still exist in the other.  However, if I 
>include tigcclib in both,
>all of the undefined errors are gone but a bunch of errors like multiple 
>definition of _adbf3,
>mulbf3, etc. and also multiple definition of one of my functions.  How do 
>I get the extra files to
>work just as if they were inside the main file?
>jeff
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - Buy the things you want at great prices.
>http://auctions.yahoo.com/

----
Rob Smith
Rob's Quote of this Reset:
A government that robs Peter to pay Paul can always depend upon the support 
of Paul.
- George Bernard Shaw








References: