Recent

Author Topic: Help need in conversion  (Read 5227 times)

ZsurzsaLaszlo

  • New Member
  • *
  • Posts: 17
Help need in conversion
« on: August 28, 2012, 09:38:23 pm »
Source: http://www.sulaco.co.za/opengl_project_glWindows.htm

Could some one should me how to convert it to lazarus, or maybe direct me to a web site where I find information regarding conversion. I find really hard in this moment to make it work under Lazarus. What do you suggest.

The program can be found in the attachment to.

Thanks,
Zs.L

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Help need in conversion
« Reply #1 on: August 29, 2012, 09:58:15 am »
Seems like I've tried that some time ago. It's easily convertible. You may want to take a look at Code Conversion Guide in the wiki. If I'm not mistaken, projects from those websites use Windows API quite heavily, so you can skip out things about portability in the conversion guide (it won't work easily on other platforms).

ZsurzsaLaszlo

  • New Member
  • *
  • Posts: 17
Re: Help need in conversion
« Reply #2 on: August 29, 2012, 11:49:42 am »
Huuuuuuuuuh, i omitted this site, or never look on it. Thanks for the info i shall look into it looks nice.

Thank you for the info.

v.denis

  • Guest
Re: Help need in conversion
« Reply #3 on: August 29, 2012, 12:23:43 pm »
Here you are:
http://rghost.net/40072171

Amazing, convesion took about 10 minutes. Though I've dropped loading jpg textures.
Also reorganized file sturcture a bit.

Converting this project you should consider:

- OpenGL in Delphi -> GL in FPC
- Some functions in FPC are not overloaded like in Delphi, i.e. you have to add postfixes on your own:
  like: 1f, 1d...
- to convert faster you can set {$mode delphi} or have to manually fix syntax differences
« Last Edit: August 29, 2012, 01:05:36 pm by v.denis »

ZsurzsaLaszlo

  • New Member
  • *
  • Posts: 17
Re: Help need in conversion
« Reply #4 on: August 29, 2012, 12:46:44 pm »
OpenGLApp.lpr(453,24) Hint: Local variable "msg" does not seem to be initialized
OpenGLApp.lpr(469,31) Hint: Mixing signed expressions and longwords gives a 64bit result
OpenGLApp.lpr(432,18) Hint: Parameter "hInstance" not used
OpenGLApp.lpr(432,37) Hint: Parameter "hPrevInstance" not used
OpenGLApp.lpr(433,18) Hint: Parameter "lpCmdLine" not used
OpenGLApp.lpr(433,37) Hint: Parameter "nCmdShow" not used
OpenGLApp.lpr(38,11) Hint: Local proc "glBindTexture" is not used
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterCustomImageList
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterMenuItem
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterMenu
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterMainMenu
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterPopupMenu
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterDragImageList
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterControl
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterWinControl
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterGraphicControl
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterCustomControl
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterScrollingWinControl
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterScrollBox
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterCustomFrame
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterCustomForm
OpenGLApp.lpr(487,1) Error: Undefined symbol: WSRegisterHintWindow
OpenGLApp.lpr(487,1) Fatal: There were 15 errors compiling module, stopping


I get this messages. Thank you for the quick response!!!!

I don't realy what to do with this althought ....

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: Help need in conversion
« Reply #5 on: August 29, 2012, 12:59:49 pm »
Quote
Error: Undefined symbol: WSRegisterCustomImageList
You have to add the Interfaces unit to the uses clause when using the LCL.

ZsurzsaLaszlo

  • New Member
  • *
  • Posts: 17
Re: Help need in conversion
« Reply #6 on: August 29, 2012, 02:51:12 pm »
Thanks, thanks itt helped me guys!!!

 

TinyPortal © 2005-2018