DLL missing problem with LazOpenGLContext package. lazarus / 70-OpenGL ---------------------------------------------------------------------- Sanem · 2016-08-07 11:04 HI I use Windows 10 system and Lazarus 1.6, and when I add LazOpenGLContext package to my project dependencies, there is a problem between my system and OpenGL, when I wanna use TOpenGLControl, it gives me an error that it can not run the project because of missing of some DLL, as you can see in Screenshot attached, the first one is the error i get and the second one is my test project inspector. And when I run same code (code below) in Lazarus 1.7 in virtual machine which is XUbuntu, i got error attached in third Screenshot. Any help appreciated prior Regards and here is my code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,  OpenGLContext; type   { TForm1 }   TForm1 = class(TForm)    procedure FormCreate(Sender: TObject);  private    { private declarations }  public    { public declarations }  end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.FormCreate(Sender: TObject);var  og: TOpenGLControl;begin  og:=TOpenGLControl.Create(self);  og.Parent:=Self;end; end. ---------------------------------------------------------------------- Thaddy · 2016-08-07 11:40 Re-install opengl and maybe restart after that. ---------------------------------------------------------------------- Handoko · 2016-08-07 12:18 I ever had such issue. Unfortunately I forget all the details. To able develop OpenGL application, your pc should has OpenGL development packages installed, which sometimes do not installed on normal system installation. Not very sure, but try to install one, some or all of this things: libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev ---------------------------------------------------------------------- Sanem · 2016-08-07 12:27 Quote from: Thaddy on August 07, 2016, 01:40:13 pmRe-install opengl and maybe restart after that. Thank you for your replay, you mean on Windows or on XUbuntu?? ---------------------------------------------------------------------- Handoko · 2016-08-07 12:28 Linux. I haven't use Windows for years, I don't know much about it. edit: oh, I see... wrong post. ---------------------------------------------------------------------- Sanem · 2016-08-07 12:49 Quote from: Handoko on August 07, 2016, 02:28:18 pmLinux. I haven't use Windows for years, I don't know much about it. edit: oh, I see... wrong post. Thank you any way, I was lookig for a solution on windows. ---------------------------------------------------------------------- Thaddy · 2016-08-07 13:10 Re-install opengl. Or even install opengl. From the xubuntu code I see that you did not install opengl there too.... It doesn't come with Lazarus or FPC. Only the bindings do. So I mean BOTH platforms. OpenGL is not installed correctly on BOTH platforms. On Windows it is not always part of the OS, Although there is often a opengl32.dll from microsoft. If you are using that from 64 bit code you'll end up getting that error, btw.... On Linux you have to install the development libraries. See above. ---------------------------------------------------------------------- Sanem · 2016-08-07 13:47 Quote from: Thaddy on August 07, 2016, 03:10:19 pmRe-install opengl. Or even install opengl. From the xubuntu code I see that you did not install opengl there too.... It doesn't come with Lazarus or FPC. Only the bindings do. So I mean BOTH platforms. OpenGL is not installed correctly on BOTH platforms. On Windows it is not always part of the OS, Although there is often a opengl32.dll from microsoft. On Linux you have to install the development libraries. See above. When I search for Installing OpenGL on Windows 10 all what I gain is about drivers, my Graphic card properties is attached in this Screenshot, I was wondering if the problem is about my laptop or the Graphic cards or drivers or what?? Any help appreciated prior ---------------------------------------------------------------------- Thaddy · 2016-08-07 13:52 Has nothing to do with that (yet). On Windows it is not always part of the OS, Although there is often a opengl32.dll from microsoft. If you are using that from 64 bit code you'll end up getting that error, btw.... ---------------------------------------------------------------------- Sanem · 2016-08-07 13:58 when I see Windows Graphic properties i see that there is OpenGL installed on my system, as you can see in Screenshot attached, still do not know where is the problem with LazOpenGLContext package! ---------------------------------------------------------------------- Sanem · 2016-08-07 14:44 Quote from: Thaddy on August 07, 2016, 03:52:15 pmHas nothing to do with that (yet). On Windows it is not always part of the OS, Although there is often a opengl32.dll from microsoft. If you are using that from 64 bit code you'll end up getting that error, btw.... I am compiling 32bit code. ---------------------------------------------------------------------- Sanem · 2016-08-07 18:12 I wanna know where is the problem in Lazarus and where is the point that it produces that error message, when I debug my code step by step I see that after the line that is highlighted Lazarus show the error (Screenshot is attached) , but I can not still understand the problem that Lazarus has with the OpenGL, because as I mentioned before I have OpenGL installed on Windows and maybe its something between Lazarus and my Graphic cards, do not know yet. any Idea??  Any help appreciated prior Regards ---------------------------------------------------------------------- Sanem · 2016-08-08 10:52 Solved! It was all about my laptop graphic cards, my laptop has 2 graphic cards, one is coming with CPU which is Intel and one is my laptop separated graphic card which is AMD, system was using Intel, when I switched the graphic card used by my system to AMD everything goes right! ---------------------------------------------------------------------- User137 · 2016-08-08 17:59 Good to know, that was a very puzzling problem... ---------------------------------------------------------------------- Akira1364 · 2016-08-20 18:16 Quote from: Thaddy on August 07, 2016, 03:52:15 pmHas nothing to do with that (yet). On Windows it is not always part of the OS, Although there is often a opengl32.dll from microsoft. If you are using that from 64 bit code you'll end up getting that error, btw.... No offense, but what you've said here is completely incorrect. The OpenGL32 DLL is included with the OS 100% of the time. For it not to be there would indicate a very serious problem (i.e. a virus, a corrupt overall Windows installation, the user somehow manually deleted it, e.t.c) Also, whether you're compiling for 32 or 64 bit is completely irrelevant. The DLL is still always called "OpenGL32". On 64-bit systems, just like every other system DLL, there are two copies: one in the "System32" folder (which is the native 64-bit version) and one in the "SysWOW64" folder (which is the 32-bit version. WOW stands for Windows-On-Windows, if you didn't know. The "SysWOW64" folder is automatically viewed as "System32" any time you run a 32-bit application.) On 32-bit systems, there is just one copy, in the "System32" folder. ---------------------------------------------------------------------- Handoko · 2016-08-20 18:26 I might be wrong but I don't think opengl32.dll is part of the OS. It will be more likely to come with 3D VGA drivers. I think so because I never heard any Windows versions featuring certain version of OpenGL. But I heard a lot NVidia/ATi model xyz featuring OpenGL certain version. Correct me if I'm wrong. ---------------------------------------------------------------------- Akira1364 · 2016-08-20 18:56 The DLL itself is included with the OS. Microsoft does not provide an actual driver themselves for any particular hardware, but all official Windows OpenGL drivers from all graphics hardware vendors like AMD/Nvidia/Intel are required to link against the Microsoft OpenGL libraries and call functions from the OpenGL32 DLL (at least in the initialization stage), in order to maintain a consistent level of standardization/quality. They are of course also allowed to implement their own extensions on top of it, however, which are generally contained in additional vendor-specific DLLs. Also, not that this is particularly important, but just in case you didn't know: ATI was acquired by AMD in 2006, and AMD stopped using the ATI brand name in 2010. EDIT: I should further clarify that there is not even really such a thing as an "OpenGL-specific driver" in the context of Windows. OpenGL support is simply one part of any given driver from any given hardware vendor (the other part being DirectX support, of course.) You cannot "install OpenGL" or "uninstall OpenGL" on Windows. ---------------------------------------------------------------------- Handoko · 2016-08-22 01:42 Oh, thanks for the correction. I searched the web and found what you said is true.