Jump to content
  • Advertisement
Sign in to follow this  
Xilliah

OpenGL wgl* functions cause access violations

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

Hello gamedevs! I am converting a project from Dev-C++ to Visual C++. The app/engine worked fine. But Visual C++ is showing me an access violation. I bet it's because VC++ is a lot stricter and I hadn't noticed before. It always happens with the openGL functions. The first openGL function that I call, is I think, wglCreateContext(). That is also where the acces violation occurs. If I comment the function out, the next one will cause an access violation, and so on. So obviously I put a few watches on the stuff. And the stuff looks fine to me. But whenever I call wglCreateContext(), no matter what I give it (even NULL) it causes an access violation. Perhaps calling the function does it? Not the code of the function? I am new to C++, help is appreciated this much: |-------------------|, Antoon/X

Share this post


Link to post
Share on other sites
Advertisement
There is probably some memory corruption happening so it just randomly crashes on that function.

Share this post


Link to post
Share on other sites
Rawr figured it out. The openGL library I used was .a, not .lib.

.a is only for mingw.. which I was used to.

using .lib fixed it. =D

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!