Question about Leverage source from Different Projects



I am trying to leverage source from a different MFC projects. I
haven't tried this before I am running into issues. I'm include the
desired source but I am having issues with the stdafx.h. In this
simple example say I have the following directories
c:\LeveragedMfcProject
c:\MfcProject

The approach I am taking is in the MfcProject source is that
1) Project --> Add Existing Item I chose LeveragedSource.h and
LeveragedSource.cpp in the LeveragedMfcProject

2) In source that wants to use I include source like this
#include "..\LeveragedSource.h"


But I am getting errors about stdafx.h fie for LeveragedSource which
contains #include "stdafx.h" in the cpp file.

Do I need to include the stdafx.h in the LeveragedMfcProject in my
MfcProject in order for this approach to work?

Hopefully I am making sense. I appreciate any advice or references for
including source from multiple projects.

Thanks

Danny

.


Loading