luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
570 stars 109 forks source link

Dll error binding #47

Closed DjArt closed 7 years ago

DjArt commented 7 years ago

When I try run my app at WIndows 8.1 RT with opengl-to-directx wrapper, located at System32 or folder with my app, your lib can't find opengl32.dll, but other native(c++) apps can find and use this wrapper. P.S. Yeah, it's very specific case, Windows RT doesn't support OpenGL and officially don't support run other applications. I can provide some information, if you needed.

luca-piccioni commented 7 years ago

What is the specific exception information? What is your platform library? WGL or EGL?

Anyway you can map libraries using your app.config, even just fir experimenting.

DjArt commented 7 years ago

4 I get this error. And I'm use WGL, I think so. What I need to write in app.config for path setting?

luca-piccioni commented 7 years ago

The app.config can be created within Visual Studio (search in templates), and you can follow the mono documentation about it.

OpenGL.Net simply uses the "opengl32.dll" string for requesting the library handle; indeed there's something in your system configuration that is confusing the OS loader. The first thing that comes in my mind is the process bitness: are you running on x86 or x64? What is the bitness of your process? The nuget package binary have Any CPU as target, letting the application force the x86 or the x64 JIT. Another thing could be the Windows side-by-side configuration.

At first, have you tried to put your opengl32.dll on the same working directory of your application?

DjArt commented 7 years ago

I'm running on ARM32. Yes, I'm tried put opengl32.dll in app folder, but no changes.

luca-piccioni commented 7 years ago

Are there any opengl32.dll dependencies unresolved? Use dumpbin or the dependency walker to get this information. Probably in this case I suppose you have everything on System32 directory.

In any case, the system is telling you what going on: 0x8007007E is the key code for searching a solution, as you can see on stackoverflow,

DjArt commented 7 years ago

All dependencies resolved. But configuring via app.config helps! Thanks you!