Setting up a project dependancy

  • Thread starter Thread starter Christopher
  • Start date Start date
C

Christopher

I made up a solution. I want to write a .dll and another project to test the
..dll
So far I have created the .dll project and the test .exe project in the same
solution.
I set the .dll project as a dependancy for the .exe project.

How do I provide settings for the .exe as to where the header and .dll are
and to link with them?

Thanx,
Chris
 
I set the .dll project as a dependancy for the .exe project.

Chris,

Won't that be the other way round - the EXE depends on the DLL?
How do I provide settings for the .exe as to where the header and .dll are
and to link with them?

It's down to how you want to structure your directories.

If you've got a structure like this:

Root
EXE project
DLL project

Source files in your EXE project can include the DLL header by using:

#include "..\DLL project\theheader.h"

An alternative way of working if you're using Visual Source Safe is to
have the DLL headers shared by both projects so that the EXE has a
copy of the header file in its own folder.

VS2003 handles the LIB for you if you've created a dependency, so the
only other issue is how does your EXE find the DLL - usually for
testing purposes, I copy the DLL to the EXE's folder.

Dave
 
Back
Top