Linker error

I’m getting something that I think is pretty crazy, and I dunno how to fix it.

First, I got ‘LINK : fatal error LNK1104: cannot open file “opengl32.dll”’ and I figured that I just hadn’t specified where opengl32.dll was.

So I checked my VC++6.0 directory settings, and since the FAQ here said that opengl32.dll should be in the system directory, I looked to see if that directory was listed. Well, it was listed under executables but nothing else, so I added it to the lib directory settings, and then got ‘c:\windows\system32\opengl32.dll : fatal error LNK1136: invalid or corrupt file’.

So what’s that about? Have I done something wrong? Is something wrong with my opengl32.dll?

I’m using Visual Studio 6.0 on WindowsXP with latest nVidia Detonator XP drivers (which I assume comes with OpenGL dlls) and haven’t downloaded anything else for OpenGL.

You CAN’T link to a .dll! That would make no sense. You use a .dll at executable time, NOT compile time.

You link with opengl32.lib which is the import library for opengl32.dll.

heh, yeah. I noticed it soon after having posted. I was being moronic or something.