Re: Repost: easy include question
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Mon, 19 Sep 2005 10:11:57 -0500
On Mon, 19 Sep 2005 06:39:02 -0700, "Maynard"
<Maynard@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>I have created a class (MyClass), and have updated the include path to
>include the directory (MyDir) where MyClass resides. When I then create new
>code that uses MyClass, I cannot simply enter "#include <MyDir\MyClass.h>"; I
>have to load MyClass source and header to the project. This doesn't seem
>right...what am I missing? If I don't add MyClass source and header to the
>project, I get unresolved external link errors.
Ah. It's the source file that's the issue, not the header file. Unless the
implementation of what the header represents is part of some library you're
linking to, you'll have to add the source file to your project, so that it
will be compiled into an object file you will link to.
--
Doug Harrison
VC++ MVP
.
- References:
- Re: Repost: easy include question
- From: Doug Harrison [MVP]
- Re: Repost: easy include question
- From: Scott McPhillips [MVP]
- Re: Repost: easy include question
- Prev by Date: Re: Having trouble with very basic OpenMP program
- Next by Date: Re: GetCurrentDirectory() in service???
- Previous by thread: Re: Repost: easy include question
- Next by thread: scope lifetime - VC7.1
- Index(es):
Relevant Pages
|