Advertisement

N00b problem: Using same files for different projects

Started by January 25, 2003 12:20 PM
1 comment, last by chevluh 21 years, 9 months ago
I made a little fullscreen Direct3D app with VC++6 and want to use the classes I built in a new app, a MFC one. I added my old files (.cpp and .h) to the new workspace, and encountered some problems. The compiler told me it couldn''t find what the #includes in the new project were referring to. This problem I could dodge by putting copies of my files in the new project''s base directory (even though it surely isn''t the right solution), but then it told me they all had unexpected end of files. So, what am I forgetting? Can''t I add files that are not in the base directory to my project? Must all the projects be in the same workspace to share files?
I''m not sure if there''s a way round it with .cpp files but for your headers you could leave em where they are and in tools->directories add the directory where they are located.
For your .cpp files you will have to place them in with the rest of your programs files.
The error about unexpected end of file means you have missed out a { somewhere (or two...), skim through and make sure that all the braces are matched up.
Advertisement
Try turning off precompiled header support. I had the same problem the other day, I was stressing somethin bad over it... go into the project settings and select the C/C++ Tab and then in the drop down select pre-compiled headers and turn them off.. that should work..

=*=
If things seem bad, think that they can get a whole load worse, and they don''t seem so bad anymore

=*=

This topic is closed to new replies.

Advertisement