I have to make an addition to my previous post, as the removal {$mode objfpc} did not solve all problems. While the program could compile without problems, Lazarus' code insight did not work with serveral types of the Jedi-SDL.

Code:
screen_ : PSDL_Surface;
screen_.format.BitsPerPixel
Above, you can see a code fragment, where the code completion of Lazarus fails.
If you would write
Code:
screen_.
and call the code completion, Lazarus would add
Code:
screen_.PSDL_Surface;
The last few days I spent some time searching for the solution, and after the hours I spent with this problem I wished that it would have been a more complex one.

Types of Jedi-SDL starting with the prefix P (like PSDL_Surface or PSDL_SysWMmsg) are pointer. If you want to access the members of the type the pointer is referencing to, you have to dereference it first. To make the above code work with code insight you have to dereference the pointer:
Code:
screen_^.format^.BitsPerPixel;
This is a problem you will not experience with Delphi, as it automatically dereferences pointer. FreePascal does not allow this unless you use the -Sd switch when compiling. Unfortunatley, Lazarus' code insight does not have a delphi mode (as far as i know) and thus does not accept the delphi syntax but if you dereference the pointer manually everything works fine.


Michael