TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Ian Hinson
from: Michael Stapleton
date: 1994-09-19 19:01:00
subject: Re: How to include own .h files?

-=> Quoting Ian Hinson to All <=-

Hello Ian,

IH> Since vendor-supplied routines are accessed in a program by
IH> using:#include  etc, I thought I'd have a go at putting
IH> some of my routines in a source file, and all the prototypes and
IH> #defines in a separate header file.

Well, I'm an Amiga programmer, so I can only give you general advice.

IH> The hope was that I could then just say #include "mystuff.h" and
IH> any new program could use the pre-written functions from other
IH> source e.g.  mystuff.c

So far, so good.

IH> It didn't work.  The compiler (TC++3.0) reported that it couldn't
IH> find the functions.

IH> What am I doing wrong?

I'd guess that it was the linker rather than the compiler, per se. Can
it find the object files containing your special routines? You will
probably have to run the linker from the command line or use a special
"makefile" which specifies how to build your final program from its
components. I'll leave these details to a PC expert.

IH> Incidently, I did say #include "mystuff.h" in the source file
IH> where the routines are.

IH> I know I can achieve the same thing by having a Project File - but
IH> that seems a bit 'Borland-specific', and I'd like to know if
IH> there's a 'ridgy-didge' way of doing it.

I suppose that the Project File ties all the necessary files together
into one place so that the compiler & linker can easily find them.

I hope that this has helped,

Michael Stapleton of Graphic Bits.

... This tagline is encrypted
--- Blue Wave/RA v2.03 AmyBW [NR]

* Origin: The Three Amigas - better than two (3:713/615.0)
SEEN-BY: 50/99 54/54 620/243 623/630 624/50 711/401 409 410 430 807 808 809
SEEN-BY: 711/932 934 942 712/508 623 713/111 317 601 611 615 618 700 888 906
SEEN-BY: 714/906 800/1
@PATH: 713/615 888 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.