OpenGL problem in VC.NET

J

John Vannoy

I have created a small OpenGL app in VC.NET and so far so good. But
when I try to create a GLUquadric object with gluNewQuadric, I get a
runtime error:

An unhandled exception of type 'System.TypeLoadException' occurred in
GLTest.exe

Additional information: Could not load type GLUquadric from assembly
GLTest, Version=1.0.1553.28010, Culture=neutral, PublicKeyToken=null.

This code is very straigtforward:

GLUquadric *quad=gluNewQuadric();

And is copied straight from a VC6 project. The program runs with no
errors if I take that line out. Any ideas?

Thanks,
John
 
C

Carl Daniel [VC++ MVP]

Did you mean to do this from managed code? It sounds like you used the
wrong "new project" wizard and made a .NET application where you wanted a
Win32 application.

-cd
 
J

John Vannoy

Hmm, actually I was trying to do this in managed code, although when I
put "#pragma unmanaged" before it, I don't get the runtime error. Why
would this code not work in managed code?

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top