visual studio .NET/openGL question
Having some troubles with Visual Studio. I'm trying to make a Vector class and Polygon class in Visual C++ .Net. The problem is if i set the project to precompiled headers i get two errors:
fatal error c1010: unexpected end of file while looking for precompiled header directive vector.cpp
and i get the same for polygon.cpp If i turn it so that i'm not using precompiled headers i get over a hundred errors, some in gl.h! I also get strange errors like:
error C3861: 'val': identifier not found, even with argument-dependent lookup
in a vector class function in my vector.cpp for instance, even though i declare val as a class variable in vector.h and include the h file in vector.cpp
can anyone help me out? or point me in the right direction?? if more info is needed please just let me know! thanks
*Use second method, but read the first*
What you need to do is go to project->"project name" properties. Then choose the C/C++ item in the list. Now when it expands choose Precompiled headers. You can choose "Not Using Precompiled Headers" to disable for the entire project.
OR
Right click on the "vector.cpp" file in the solution explorer on the right and choose properties. Now follow the same steps as the frist method starting with choosing the C/C++ item in the list. Repeat for the polygon.cpp file. That should work in disabling it for those two files.
- Drew
What you need to do is go to project->"project name" properties. Then choose the C/C++ item in the list. Now when it expands choose Precompiled headers. You can choose "Not Using Precompiled Headers" to disable for the entire project.
OR
Right click on the "vector.cpp" file in the solution explorer on the right and choose properties. Now follow the same steps as the frist method starting with choosing the C/C++ item in the list. Repeat for the polygon.cpp file. That should work in disabling it for those two files.
- Drew
thanks for the help guys! just out of curiosity though why would including windows.h in every file help?
sorry! maybe i'm just not getting it but i tried what you guys said and it didn't seem to work out for me. This is what i have: my main cpp file, vector.h/cpp and polygon.h/cpp.
vector.h includes math, polygon includes vector and gl/gl.h, and main includes windows.h, gl/gl.h, gl/glu.h, gl/glaux.h and polygon.h
i've tried setting all of them to 'using precompiled headers' and i get:
fatal error C1010: unexpected end of file while looking for precompiled header directive
i've tried setting them all to 'not using precompiled headers' but i get a ton of errors mostly in gl.h and a couple in vector.cpp which say 'identifier not found' even though it's with regards to a variable that i defined in the vector class in vector.h. Including windows.h in the files that use gl (main and polygon) gets rid of the gl.h errors but keeps those vector errors that i mentioned. Any more ideas?? this is terribly frustrating...thanks for your time! ^^
vector.h includes math, polygon includes vector and gl/gl.h, and main includes windows.h, gl/gl.h, gl/glu.h, gl/glaux.h and polygon.h
i've tried setting all of them to 'using precompiled headers' and i get:
fatal error C1010: unexpected end of file while looking for precompiled header directive
i've tried setting them all to 'not using precompiled headers' but i get a ton of errors mostly in gl.h and a couple in vector.cpp which say 'identifier not found' even though it's with regards to a variable that i defined in the vector class in vector.h. Including windows.h in the files that use gl (main and polygon) gets rid of the gl.h errors but keeps those vector errors that i mentioned. Any more ideas?? this is terribly frustrating...thanks for your time! ^^
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement