Results 1 to 9 of 9

Thread: Delphi to Lazarus

  1. #1

    Delphi to Lazarus

    I'm making a little test to see the posibility of porting my engine from Delphi to Lazarus, then later on to port it to another platform.

    I used the Lazarus convertion tool, and the first problem I found is that Windows unit is gone... how can I use Win32 API functions? Should I set the unit search path to some Delphi's directory?

    Regards!

  2. #2

    Delphi to Lazarus

    You can't use winapi in unix. If you want to be Lazarus/windows only then just re-add the windows unit to uses section.

    If you want to be cross-platform then use fpc specific rtl methods and/or {$ifdef} where needed.

    There are now alot of nice abstraction units which alleviate some of the more common winapi stuff (eg: dynlibs unit).
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  3. #3

    Delphi to Lazarus

    That's what I supposed. I'll check those units, thanks

  4. #4

    Delphi to Lazarus

    Some winapi functions are emulated in the LCLIntf unit.

  5. #5

    Delphi to Lazarus

    Is there a reference or guide for the multiplataform windows functions? :?

  6. #6

    Delphi to Lazarus

    Quote Originally Posted by cronodragon
    Is there a reference or guide for the multiplataform windows functions? :?
    Not really. http://lazarus-ccr.sourceforge.net/d...f/index-5.html shows them, but is not more than a list of functions.

    For windows most of the time, they just point to the same name function from winapi, see msdn. For gtk there are emulations.

  7. #7

    Delphi to Lazarus

    What Win32 function do you need? The Win32-API is large, it depends on which functionality you need what replacement you need to use, and therefore which documentation you need.

  8. #8

    Delphi to Lazarus

    I just need the functions to create a window, like RegisterClass() and CreateWindow() (which I don't see in that list of functions), the functions to show, hide and measure the window, basically. On the other hand, I don't know if the message loop in windows still works for other platforms... is it emulated? :?

  9. #9

    Delphi to Lazarus

    No, these functions are not in the LCLIntf unit.

    Note that this unit is to support porting running LCL applications which make occasional use of some winapi functions. The LCLIntf is not port application using the winapi directly.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •