Recent

Author Topic: DLL missing problem with LazOpenGLContext package.  (Read 11516 times)

Sanem

  • Full Member
  • ***
  • Posts: 173
DLL missing problem with LazOpenGLContext package.
« on: August 07, 2016, 01:04:51 pm »
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][+][-]
  1.  
  2. unit Unit1;
  3.  
  4. {$mode objfpc}{$H+}
  5.  
  6. interface
  7.  
  8. uses
  9.   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
  10.   OpenGLContext;
  11.  
  12. type
  13.  
  14.   { TForm1 }
  15.  
  16.   TForm1 = class(TForm)
  17.     procedure FormCreate(Sender: TObject);
  18.   private
  19.     { private declarations }
  20.   public
  21.     { public declarations }
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. {$R *.lfm}
  30.  
  31. { TForm1 }
  32.  
  33. procedure TForm1.FormCreate(Sender: TObject);
  34. var
  35.   og: TOpenGLControl;
  36. begin
  37.   og:=TOpenGLControl.Create(self);
  38.   og.Parent:=Self;
  39. end;
  40.  
  41. end.
  42.  
  43.  
  44.  
« Last Edit: August 07, 2016, 02:50:52 pm by simin_sh »

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: DLL missing problem with LazOpenGLContext package.
« Reply #1 on: August 07, 2016, 01:40:13 pm »
Re-install opengl and maybe restart after that.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: DLL missing problem with LazOpenGLContext package.
« Reply #2 on: August 07, 2016, 02:18:38 pm »
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
« Last Edit: August 07, 2016, 02:22:42 pm by Handoko »

Sanem

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #3 on: August 07, 2016, 02:27:35 pm »
Re-install opengl and maybe restart after that.

Thank you for your replay, you mean on Windows or on XUbuntu??

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: DLL missing problem with LazOpenGLContext package.
« Reply #4 on: August 07, 2016, 02:28:18 pm »
Linux. I haven't use Windows for years, I don't know much about it.

edit:
oh, I see... wrong post.
« Last Edit: August 07, 2016, 02:30:47 pm by Handoko »

Sanem

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #5 on: August 07, 2016, 02:49:43 pm »
Linux. 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

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: DLL missing problem with LazOpenGLContext package.
« Reply #6 on: August 07, 2016, 03:10:19 pm »
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.
« Last Edit: August 07, 2016, 03:50:10 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Sanem

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #7 on: August 07, 2016, 03:47:35 pm »
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.
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

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: DLL missing problem with LazOpenGLContext package.
« Reply #8 on: August 07, 2016, 03:52:15 pm »
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....
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Sanem

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #9 on: August 07, 2016, 03:58:25 pm »
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!
« Last Edit: August 07, 2016, 04:32:11 pm by simin_sh »

Sanem

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #10 on: August 07, 2016, 04:44:35 pm »
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....


I am compiling 32bit code.

Sanem

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #11 on: August 07, 2016, 08:12:56 pm »
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

  • Full Member
  • ***
  • Posts: 173
Re: DLL missing problem with LazOpenGLContext package.
« Reply #12 on: August 08, 2016, 12:52:23 pm »
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!
« Last Edit: August 09, 2016, 08:46:13 am by simin_sh »

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: DLL missing problem with LazOpenGLContext package.
« Reply #13 on: August 08, 2016, 07:59:10 pm »
Good to know, that was a very puzzling problem...

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: DLL missing problem with LazOpenGLContext package.
« Reply #14 on: August 20, 2016, 08:16:19 pm »
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....

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.
« Last Edit: August 20, 2016, 11:46:19 pm by Akira1364 »

 

TinyPortal © 2005-2018