Sign in to follow this  

[.net] C++.net, OpenGL & windows.forms

This topic is 4747 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

Hi All, I'm currently coding a small app using windows forms and opengl in c++, the problem I'm having is when compliling I get an error - C:\OGLSDK\include\gl\gl.h(1155): error C2086: 'int APIENTRY' : redefinition C:\OGLSDK\include\gl\gl.h(1151) : see declaration of 'APIENTRY' - it stops at 100 errors! I'm new to the .net ide, is there a setting, #pragma or something I'm missing? Using VS.net pro 2002 on xp pro, ogl release 2. As I couldn't find any examples (found plenty of posts asking for one though!), I'll post it when done. Thanks.Micko

Share this post


Link to post
Share on other sites
Quote:
Original post by Micko
Hi All,
I'm currently coding a small app using windows forms and opengl in c++, the problem I'm having is when compliling I get an error -

C:\OGLSDK\include\gl\gl.h(1155): error C2086: 'int APIENTRY' : redefinition
C:\OGLSDK\include\gl\gl.h(1151) : see declaration of 'APIENTRY'

- it stops at 100 errors!

I'm new to the .net ide, is there a setting, #pragma or something I'm missing?
Using VS.net pro 2002 on xp pro, ogl release 2.
As I couldn't find any examples (found plenty of posts asking for one though!), I'll post it when done.
Thanks.Micko

The Microsoft implementation of OpenGL uses types defined in windows.h, so you have to include it before including gl.h. Did you try adding "#include <windows.h>" to your headers?

HTH,

Share this post


Link to post
Share on other sites

This topic is 4747 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this