Visual C
Posted: Thu Mar 03, 2011 4:59 am
Hi,
I am reasonably new to Visual C++, and I have a question about headers.
Currently my 'solution' (as VC++ calls it) contains three projects, two of which are static libraries, the other is the main project.
I have tried creating a header file under the 'Header Files' in a library project, then in main.c I have tried to include it.
VC++ comlains that it can't find the header file. I realise that I could add the path to the include path on the main project.
Is this the correct VC++ way? Should I be putting the header files in the library projects, which contain the functions I am 'extern'ing, or should I put the header files in the main project, which contains the file within which I am '#include'ing the headers?
Sorry if what I have written is confusing, or sounds a bit silly. I'm just interested in the best practice in this case.
Thanks again
I am reasonably new to Visual C++, and I have a question about headers.
Currently my 'solution' (as VC++ calls it) contains three projects, two of which are static libraries, the other is the main project.
I have tried creating a header file under the 'Header Files' in a library project, then in main.c I have tried to include it.
VC++ comlains that it can't find the header file. I realise that I could add the path to the include path on the main project.
Is this the correct VC++ way? Should I be putting the header files in the library projects, which contain the functions I am 'extern'ing, or should I put the header files in the main project, which contains the file within which I am '#include'ing the headers?
Sorry if what I have written is confusing, or sounds a bit silly. I'm just interested in the best practice in this case.
Thanks again