Archived

This topic is now archived and is closed to further replies.

johndunne

Including files in an MSVC Workspace

Recommended Posts

Hey guys, Could someone please offer advice on this problem, i''m sure its simple to answer. I''m creating a simple physics engine, the source files are in one directory so that they can be commonly used on various other projects I intend to do. Now, I create a new workspace, and add the physics engine source files into the project. Once this is done, I compile but then i get error C1083, cannot open file. The physics source isn''t read only and the paths are all correct! Any tips? Thanks in advance...

Share this post


Link to post
Share on other sites
what''s the exact error message?

one thing you may want to do is create a library and link all your projects to the library rather than the source files. they''ll only need the header and the library file for linking then.

Share this post


Link to post
Share on other sites
Thanks for the reply! The exact message is

fatal error C1083: Cannot open include file: ''MemoryManage.h'': No such file or directory

I''ve never created a library in MSVC6, i think this is what i need to do to get it to work, is it easily implemented?

Share this post


Link to post
Share on other sites
okay there are at least two ways to fix your problem.

try this first one and i'll tell you the second if it doesn't work:

your project needs to know where to find the header file.

in project->settings... choose the c/c++ tab and select the preprocessor category in the dropdown list.

in 'additional include directories' put the path to the files you want the project to know about. a relative path would be ./utilities/memorymanager or something similar. if you can't work it out just put the hard path c:/work/utilities/memorymanager or whatever it is. don't forget to separate paths by a comma.

edit: you don't put the name of the file, just the directory where it can be found

[edited by - petewood on November 7, 2002 10:35:41 AM]

Share this post


Link to post
Share on other sites