__Julien__
asked on
reference to another project
I'm new on Visual and I've got a project under Visual.NET 2002 in unmanaged C++. The project code contained the code for all the tests. It was a problem because even under Release configuration, the tests were compiled and a dll was requested at run-time. As I didn't want the client to install this dll, I created another project in the same solution where I moved the tests.
I tried to compile this new project but it didn't work.
I copied the stdafx from the main project to the new one. There is an improvement but it still doesn't compile. For example, at the line
enum { IDD = IDD_AVAILABLE_CODES_DLG };
it doesn't know IDD_AVAILABLE_CODES_DLG. I've tried to copy the .rc and .rc2 files as well as the resource.h but to no avail.
Can someone help me?
Thank you
I tried to compile this new project but it didn't work.
I copied the stdafx from the main project to the new one. There is an improvement but it still doesn't compile. For example, at the line
enum { IDD = IDD_AVAILABLE_CODES_DLG };
it doesn't know IDD_AVAILABLE_CODES_DLG. I've tried to copy the .rc and .rc2 files as well as the resource.h but to no avail.
Can someone help me?
Thank you
ASKER
OK, it works but now I've got plenty of "unresolved external references" for all my first project's methods called from my test project. I understand what it means but how can I fix this under Visual ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am still waiting for __Julien__'s response. Without his feedback I think that my answer is OK.
ASKER
Sorry for the delay, I thought I had already accepted the answer.
#include "stdafx.h"
#include "MainApp.h" // Application class h-file, which includes resources.h
#include "ThisClass.h" // this class h-file
// other include lines
Instead of MainApp.h you can use resources.h:
#include "staafx.h"
#include "resource.h"
#include "ThisClass.h" // this class h-file
// other include lines
In any case, when ThisClass.h is compiled, resource.h is already included.