Jump to content
  • Advertisement
Sign in to follow this  
Strider81

OpenGL visual studio .NET/openGL question

This topic is 5036 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
*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

Share this post


Link to post
Share on other sites
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! ^^

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!