PDA

View Full Version : Using Jedi-SDL under Lazarus



jasonf
13-01-2005, 04:02 PM
I've got it more or less working spot on, but I had to do a few things which may be important or useful for others.

1, The Intellisense only works if all of your units in scope can be found and compile. Include files screw this up royally. There's a slight work around on the Lazarus site, but I've only been able to make this work intermittantly. I had to remove all of the jedi-sdl.inc references.

2, The project needs to be able to see all of the pas files for Jedi-SDL for the modules of SDL you're using, this means either putting loads of path statements into the project settings or creating Symlinks (under Linux) for all of the pas files into the root of the Jedi-SDL directory and having just a single path to them in the project.

Occasionally, I find that the compiler messes up and it crashes when using SDL, this is fixed by using the clean directory option on the file menu. Run it for the project directory and jedi-sdl and it shold fix the problem.

On the whole, Lazarus is a cool platform for developing JEDI-SDL apps.

{MSX}
13-01-2005, 04:56 PM
1, The Intellisense only works if all of your units in scope can be found and compile. Include files screw this up royally. There's a slight work around on the Lazarus site, but I've only been able to make this work intermittantly. I had to remove all of the jedi-sdl.inc references.


How did you removed the references ?

Also, do you use GL and GLU in your project ?

jasonf
13-01-2005, 05:45 PM
I just deleted the reference to it in the file. the {$I jedi-sdl.inc} line. It still compiles OK and Lazarus can parse the file and give intellisense.

I don't use GL or GLU in my project. It's totally 2D, just SDL surfaces and so on. Probably would be faster if I used GL, but I started this project years ago...

When it's closer to completion, I'll put something on my site so you can see it. probably won't be ready for the Dogfight compo though.

I hope the Lazarus guys fix the include issue soon. At the moment, it's a documented feature in the FAQ section as a common newbie trip up point.

marcov
14-01-2005, 07:12 AM
I just deleted the reference to it in the file. the {$I jedi-sdl.inc} line. It still compiles OK and Lazarus can parse the file and give intellisense.

I don't use GL or GLU in my project. It's totally 2D, just SDL surfaces and so on. Probably would be faster if I used GL, but I started this project years ago...

When it's closer to completion, I'll put something on my site so you can see it. probably won't be ready for the Dogfight compo though.

I hope the Lazarus guys fix the include issue soon. At the moment, it's a documented feature in the FAQ section as a common newbie trip up point.

The inc file typically:
- puts FPC in Delphi mode. Lazarus typically already does this itself
- adds support for non-linux/x86 and win32 platforms.
- does version dependant conditionals (SDL only has a few of these).

See http://www.stack.nl/~marcov/porting.pdf for some reasons for these files.