Compiling Multiple Code Files


Hi all;

I'm new to building CLR Console apps, so I have a very simple issue
that I'm sure that most of you will know how to resolve.

So far, I've had all of my code in one file. I have tried to lift
one of my classes out, and put it into a code file (Code02.Cpp),
with a namespace enclosure. I then inserted a "using namespace"
directive at the top of the first file.

I've compiled the new file without any problems. When I compile the
first file, the compiler gives me loads of errors, the most significant
being that the namespace given in the using directive does not exist.

I am using Visual Studio 2008 BTW.

Can anyone tell me what it is that I am doing wrong?

THANKS!!!
you have to put class definitions in a hearer file, then #include that header in .cpp

Hi Hamsterman;

Then there is no other way?

What about an object library?

I used to compile things into an object library many years ago,
but I don't see how to do it with Visual Studio.

THANKS for the response!
Topic archived. No new replies allowed.