Apr 27, 2011 at 2:15pm UTC
I'm having a major issue in Visual C++. I've asked questions on here before and received thorough, prompt answers. I haven't had much luck on the Visual C forums.
I am hoping that others have had the same issue from this forum and perhaps may be able to assist me.
I'm basically having the issue of a directory error. In any of my projets, I am not able to use cuustom headers. I have about 7 different projects as attempts. I have written very simple main.cpp(s) and created even simpler header files. However, I can never compile it becuase it always tells me the header file does not exist.
I have tried saving my header file to the project folder, to visual studio's include folder, and to the microsoft sdk include folder. I have also added the directories to the include directory search list that wasn't already on there. None of this worked. I still get the exact same error. It keeps telling me that it cannot open the <insert header name.h> header, file does not exist. It's really nerve racking... I just dont understand. This HAS to be a simple issue that i'm just underlooking.
Any help is appreciated. Again, microsoft forums are not really gettin any hits for me.
EDIT:: My issue has been solved.
Last edited on Apr 27, 2011 at 3:48pm UTC
Apr 27, 2011 at 2:46pm UTC
Nope, still gettin the same error; 1>c:\users\IMAUSERNAME\documents\visual studio 2008\projects\test3.0\main.cpp(1) : fatal error C1083: Cannot open include file: 'readerz.h': No such file or directory
Apr 27, 2011 at 3:26pm UTC
Thank you coder777, but i'm still a bit confused. I cannot understand what this guy is saying. I don't beleive his english is very good. Could you elaborate a bit? I got into the directory he was taking about, but what am I suppose to add?
Apr 27, 2011 at 3:33pm UTC
I went ahead and added the project directory in the additional include box. I'm not sure if i've made progress or if I just messed something else up. I now receive 102 new errors... Here is my 2 test file sources.
[[[main.cpp]]]
#include "Header1.h"
int main ()
{
std::cout<<"Test...\n";
void FunctionOne();
std::cin.get();
return 0;
}
____________________________
[[[Header1.h]]]
#include<iostream>
void FunctionOne()
{
std::cout<<"Test Complete";
}
_______________________________
Apr 27, 2011 at 3:34pm UTC
Here is my new error(s) [there are over a hundred now]
1>Compiling...
1>main.cpp
1>c:\program files\microsoft visual studio 10.0\vc\include\yvals.h(194) : warning C4068: unknown pragma
1>c:\program files\microsoft visual studio 10.0\vc\include\yvals.h(203) : warning C4068: unknown pragma
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(355) : error C2143: syntax error : missing ',' before '&&'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(356) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(358) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(361) : error C2649: 'typename' : is not a 'class'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(367) : error C2649: 'typename' : is not a 'class'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(375) : error C2947: expecting '>' to terminate template-argument-list, found '>'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(380) : error C2236: unexpected 'struct' 'std::tr1::_Copy_cv'. Did you forget a ';'?
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(380) : error C3381: 'std::tr1::_Copy_cv' : assembly access specifiers are only available in code compiled with a /clr option
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(388) : error C2977: 'std::tr1::_Copy_cv' : too many template arguments
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(377) : see declaration of 'std::tr1::_Copy_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(396) : error C2977: 'std::tr1::_Copy_cv' : too many template arguments
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(377) : see declaration of 'std::tr1::_Copy_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(404) : error C2977: 'std::tr1::_Copy_cv' : too many template arguments
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(377) : see declaration of 'std::tr1::_Copy_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(411) : error C2977: 'std::tr1::_Copy_cv' : too many template arguments
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(377) : see declaration of 'std::tr1::_Copy_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(243) : error C2059: syntax error : '&&'
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(244) : see reference to class template instantiation 'std::tr1::add_rvalue_reference<_Ty>' being compiled
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(243) : error C2238: unexpected token(s) preceding ';'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(427) : error C2143: syntax error : missing ',' before '&&'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(429) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(430) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(433) : error C2649: 'typename' : is not a 'class'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(456) : error C2649: 'typename' : is not a 'class'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(462) : error C2947: expecting '>' to terminate template-argument-list, found '>'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(463) : error C2236: unexpected 'struct' 'std::tr1::_Is_member_object_pointer'. Did you forget a ';'?
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(463) : error C3381: 'std::tr1::_Is_member_object_pointer' : assembly access specifiers are only available in code compiled with a /clr option
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(463) : error C2143: syntax error : missing ';' before '<'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(463) : error C2059: syntax error : '<'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(464) : error C2065: '_Ty1' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(464) : error C2143: syntax error : missing ',' before '<tag>::*'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(464) : error C2039: 'value' : is not a member of '`global namespace''
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(465) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(466) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(471) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(472) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(477) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(477) : error C2955: 'std::tr1::remove_cv' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(155) : see declaration of 'std::tr1::remove_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(478) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(479) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(485) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(486) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(490) : error C2065: 'is_member_object_pointer' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(490) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(490) : error C2059: syntax error : '>'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(491) : error C2039: 'value' : is not a member of '`global namespace''
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(491) : error C2039: 'value' : is not a member of '`global namespace''
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(492) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(493) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(497) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(497) : error C2955: 'std::tr1::remove_cv' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(155) : see declaration of 'std::tr1::remove_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(498) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(499) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(503) : error C2061: syntax error : identifier '_Ty'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(504) : error C2143: syntax error : missing ';' before '{'
Apr 27, 2011 at 3:35pm UTC
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(505) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(509) : error C2061: syntax error : identifier '_Ty'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(510) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(511) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(516) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(516) : error C2955: 'std::tr1::remove_cv' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(155) : see declaration of 'std::tr1::remove_cv'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(517) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(518) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(523) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(524) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(529) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(530) : error C2955: 'std::tr1::is_integral' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(375) : see declaration of 'std::tr1::is_integral'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(530) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(530) : error C2955: 'std::tr1::is_floating_point' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(382) : see declaration of 'std::tr1::is_floating_point'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(531) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(532) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(537) : error C2065: 'is_arithmetic' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(537) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(538) : error C2955: 'std::tr1::_Cat_base' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(538) : error C2027: use of undefined type 'std::tr1::_Cat_base'
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(538) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(538) : error C2955: 'std::tr1::is_void' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(368) : see declaration of 'std::tr1::is_void'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(539) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(540) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(545) : error C2065: 'is_function' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(545) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(546) : error C2955: 'std::tr1::_Cat_base' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(546) : error C2027: use of undefined type 'std::tr1::_Cat_base'
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(547) : error C2039: 'value' : is not a member of '`global namespace''
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(547) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(547) : error C2955: 'std::tr1::is_void' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(368) : see declaration of 'std::tr1::is_void'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(548) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(549) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(553) : error C2947: expecting '>' to terminate template-argument-list, found '>'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(553) : error C2975: 'std::tr1::_Cat_base' : invalid template argument for 'unnamed-parameter', expected compile-time constant expression
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(554) : error C2065: '_From' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(554) : error C2955: 'std::tr1::is_void' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 10.0\vc\include\type_traits(368) : see declaration of 'std::tr1::is_void'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(554) : error C2061: syntax error : identifier '_From'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(555) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(556) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(561) : error C2061: syntax error : identifier '_Ty'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(562) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(563) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(568) : error C2065: 'is_fundamental' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(568) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(568) : error C2955: 'std::tr1::_Cat_base' : use of class template requires template argument list
Apr 27, 2011 at 3:36pm UTC
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(568) : error C2027: use of undefined type 'std::tr1::_Cat_base'
1> c:\program files\microsoft visual studio 10.0\vc\include\xtr1common(214) : see declaration of 'std::tr1::_Cat_base'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(569) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(570) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(575) : error C2065: 'is_member_object_pointer' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(575) : error C2065: '_Ty' : undeclared identifier
1>c:\program files\microsoft visual studio 10.0\vc\include\type_traits(575) : fatal error C1003: error count exceeds 100; stopping compilation
1>Build log was saved at "file://c:\Users\JaCodi\Documents\Visual Studio 2008\Projects\test3.0\Debug\BuildLog.htm"
1>test3.0 - 102 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
This could be my fault. I had 2010, but I am working on a project with a group and we are all wanting to use the same version so I uninstalled 2010 and installed the free 2008 edition. I'm not sure why i'm getting these errors. Perhaps I should get rid of the VS10 directory search. I beleive I added that.