remote include files
Now that I have made some crappy little projects I want to move on to something a bit bigger.
One thing I want to do is have a directory for all my header files that is separate from the main program directory, and also a separate directory for the implementation code for the headers.
The problem I am having is that I want to be able to #include the header file and have the compiler search my source directory and compile the source file for the header automatically, instead of having to include both files in the VC++ workspace.
I know there is probably a simple answer to this but I haven''t been able to find it in MSDN.
Shabadoo
if you have the include folder in the same directory as your project then do this
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
#include "includeFolder\includeFile.h"
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
October 24, 2000 06:32 AM
You can add pathes to the default search path for include files in Tools\Options\Directories
I did add the paths in Tools/Options/Directories but when I tried to compile the main application it came up with an warning message saying there was a problem compiling the header.
Then when I tried to create the exe it came up with unresolved external symbols because the header hadn''t been compiled.
Shabadoo
Then when I tried to create the exe it came up with unresolved external symbols because the header hadn''t been compiled.
Shabadoo
What errrors did you get? Something about precompiled headers not found maybe? Let us know what it was and we can probably help.
And stick with the directory idea. I have my class library etc.. on a network server that I pull from as needed. Works pretty well.
Edited by - JonStelly on October 24, 2000 8:52:24 AM
And stick with the directory idea. I have my class library etc.. on a network server that I pull from as needed. Works pretty well.
Edited by - JonStelly on October 24, 2000 8:52:24 AM
Unresolved externals is a link error, not a compile error. It means either that you declared a symbol without implementing it, or you aren''t linking all the necessary obj and lib files. Could it be that you aren''t including the implementation files for your headers in your project?
Like SiCrane was saying, you need to include all the implementations of your headers in the projects. In other words, all your .cpp files that go with your .h files need to be included in your projects...
Cyberdrek
Headhunter Soft
DLC Multimedia
Cyberdrek
Headhunter Soft
DLC Multimedia
[Cyberdrek | ]
I''d suggest building everything into static libraries, can make things a little easier.
Thanks for the help, adding the implementation files to the project is what I wanted to get away from but it looks like I''ll have to do it.
Shabadoo
Shabadoo
Shabadoo, that was why I suggested building the static libraries. That way you''d add support for your library the same way as most other things... Include file and Lib file added to the project. I''m not a big fan of having to re-compile a library of mine over and over again without it changin.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement