PDA

View Full Version : I found the perfect IDE for Freepascal.



Pineapple Head
23-10-2005, 08:01 AM
I use:

http://www.context.cx/

After the installation, start the program, use the Object Pascal as the active hilighter.

Then Goto "Options" menu and select "Execute Keys".

Click the "Add" button, and type "pas".

Select F9 and these fields should be filled in:
Execute: the complete directory where your fpc.exe is. Example: X:\FreePascal\2.0.0\bin\i386-win32\fpc.exe
Start in: %p
Paremeters: %f
Window mode is Normal

Capture Console Output is optional. You can check or uncheck it.

Now selecy F10 and fill out these fields:
Execute: %p%F.exe
Start in: %p
Save: Nothing (Save in the drop down list should be set to nothing).

Leave the rest of the fields alone.

After that your all set.

When you want to run your pascal program for the first time, hit F9 and then F10. If you hit F10 before compiling for the first time, you'll get an error saying that it's missing an exe file.

F9 - Compiles
F10 - Runs

As for F11 and F12, I think that could be used to compile the file in Delphi mode.

And anyways, I am looking fowards to making some OpenGL games in either freepascal(mostly) or Lazarus.

I'm still new to the whole programming joint but I just figured out how to work FPC with this IDE..

I hope this helps.

marmin
27-10-2005, 04:08 AM
It's indeed a nice IDE !
Thank you for giving a little tutorial, it works with me now.
8) :lol:

I use the IDE of Lazarus now but because the lazarus files are very inefficient I may use this one instead.. i have to learn some win32 api then to see how i make a form.

technomage
27-10-2005, 11:05 AM
That is a nice little IDE there. Thanls for the instructions , it worked a treat :D

cragwolf
03-02-2006, 04:57 AM
Very nice IDE for Windows.

sttillmann
04-03-2006, 12:16 PM
I'm using Geany (http://geany.sf.net/) for some time now.

Geany (http://geany.sf.net/) is a text editor using the GTK2 toolkit with basic features of an integrated development environment.

Basic features of Geany (http://geany.sf.net/):
- syntax highlighting
- code completion
- auto completion of often used constructs like if, for and while
- auto completion of XML and HTML tags
- call tips
- many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
- symbol lists

Before I've found this great IDE, I've used Vim the most time. Tried out FPC IDE and Lazarus, but Geany (http://geany.sf.net/) is my favorite editor now!

Best regards,
st

cragwolf
05-03-2006, 11:40 PM
Questions regarding Geany:

* Does it do syntax highlighting, code completion, auto completion and call tips for Pascal?
* Can you change the colours used for the syntax highlighting?
* Can you add your own keywords to be highlighted?

I use Bluefish as my code editor, it lets you configure the syntax highlighting, e.g. colours, keywords, etc.

cragwolf
08-03-2006, 06:54 PM
I tried out geany. I couldn't get code completion or navigation or tips to work for pascal. Also, their list of pascal keywords is severely limited. Fortunately, you can change that by editing the /usr/local/share/geany/filetypes.pascal file. Another problem is that while // and (* *) are recognised as comments, they aren't highlighted as such. I had to edit the source code of geany (and edit the filetypes.pascal file) to make it highlight those types of comments properly. I will contact the developers to add this code in.

There are a couple of limitations, too. You can bold parts of your code, but you can't italicize them. I like to italicize my comments, but you can't do that with geany. Another problem is that the background of the currently selected line is hard-coded to a light grey colour; this should really be an option, but I just edited the source code myself to make it white, the same colour as the default background of the editor.

But overall it's a very good editor, and it's now the IDE I use for pascal coding.

Almindor
09-03-2006, 10:50 PM
I wonder why people don't use Lazarus.

It has absolutly everything from code completion to refactoring the power of eclipse and it eats less than 20megs of RAM.

Don't get me wrong, I'm just curious as to what drives people elsewhere.

aidave
10-03-2006, 01:32 AM
i think im switchin to freepascal + lazarus soon
im really impressed with it :wink:

if i had only known about it earlier :cry:

cragwolf
10-03-2006, 04:49 AM
I wonder why people don't use Lazarus.

Two main reasons:

1. It's based on the GTK1 library, not the GTK2 library. I prefer the look, feel and functionality of the GTK2 controls; I find the GTK1 controls to be ugly, especially the fonts. All of the non-command-line programs I use in my Linux distribution are GTK2 apps; surely it's time for Lazarus to join the rest of the world in this respect (or else go the KDE route)?

2. Lazarus is a Delphi clone. So it is more than just a simple IDE, it is also a RAD application. It has all the extra baggage associated with that: the visual form designer, the visual component palette, the object inspector. This makes the program more bloated with features and therefore more bug-ridden than a simple IDE. It just so happens that all I really want is a simple IDE, and I don't need all those RAD features.

The IDE I use at the moment also has its downsides, but these are not as significant to me as the downsides of Lazarus. There's not much in it, but eventually one has to make a choice.

WILL
10-03-2006, 06:08 AM
2. Lazarus is a Delphi clone. So it is more than just a simple IDE, it is also a RAD application. It has all the extra baggage associated with that: the visual form designer, the visual component palette, the object inspector. This makes the program more bloated with features and therefore more bug-ridden than a simple IDE. It just so happens that all I really want is a simple IDE, and I don't need all those RAD features.

I run Lazarus after being a long time Delphi(and before that Turbo Pascal) user. I have found that you can configure it to work as an IDE-only AND a RAD App enviroment, just like you can with Delphi. Now, if Delphi doesn't float your boat either, this doesn't weight in much as a factor for you. Just know that you can strip all the Object Library and visual compenent stuff from your program just as you can with Delphi.

I'm currently using Lazarus to create my latest game project (which doesn't make use of any LCL or component libraries of any kind, just my own libraries and good ole JEDI-SDL) and I am finding it to work well for what I need it to do. Plus the Free Pascal compiler capabilities give me options that make me salvate at the mouth for hours. :drool:

Now it does give me a 989kb exe file, but I'm not using any size reducing options and have not used any external useless code stripping or compressing apps on it. That seems to be my biggest beef, other than that I like it just as much as I did Delphi.


Besides Lazarus (and of course the outdated Dev-Pascal), what other FPC capable IDEs and enviroments do you guys use or favor?I should do up a master list one day. ;)

Almindor
10-03-2006, 08:55 AM
Two main reasons:

1. It's based on the GTK1 library, not the GTK2 library. I prefer the look, feel and functionality of the GTK2 controls; I find the GTK1 controls to be ugly, especially the fonts. All of the non-command-line programs I use in my Linux distribution are GTK2 apps; surely it's time for Lazarus to join the rest of the world in this respect (or else go the KDE route)?


This can be fixed. make LCL_PLATFORM="gtk2" now produces rather nice looking gtk2/gnome IDE. Problem is that it still has that stupid refresh/speed bug. I'm really angry nobody(including my lazy ass) looked at that yet.



2. Lazarus is a Delphi clone. So it is more than just a simple IDE, it is also a RAD application. It has all the extra baggage associated with that: the visual form designer, the visual component palette, the object inspector. This makes the program more bloated with features and therefore more bug-ridden than a simple IDE. It just so happens that all I really want is a simple IDE, and I don't need all those RAD features.

You can configure Lazarus as you wish. Somehow I still think it's more lightweight and fast than most other even simpler IDEs out there (Except perhaps for the synedit part which is getting improved tho)



The IDE I use at the moment also has its downsides, but these are not as significant to me as the downsides of Lazarus. There's not much in it, but eventually one has to make a choice.

Ofcourse :) It's your choice. I just think most people don't know what lazarus is capable of and how lightweight it manages to be with all those features. For example I bet you have no idea what ctrl+shift+c does :) I urge you to try it!

cragwolf
10-03-2006, 12:31 PM
This can be fixed. make LCL_PLATFORM="gtk2" now produces rather nice looking gtk2/gnome IDE. Problem is that it still has that stupid refresh/speed bug. I'm really angry nobody(including my lazy ass) looked at that yet.

Yes, I've tried it, too, and I've also experienced that refresh/lag bug. Maybe they've fixed a few things since, but I also found some problems with some of the preferences windows and controls when I compiled it with the gtk2 widget set.


You can configure Lazarus as you wish.

Yes, I see WILL mentioned this as well.


Ofcourse :) It's your choice. I just think most people don't know what lazarus is capable of and how lightweight it manages to be with all those features. For example I bet you have no idea what ctrl+shift+c does :) I urge you to try it!

I didn't know about that. I just tried it and it adds an identifying comment to the top of a class in the interface section. Is that right? That's neat fluff. :)

Of course the other nice thing about my current IDE is that it also does C/C++, LaTeX, HTML, which are 3 languages that I use fairly frequently, so having the one tool for each job is pretty cool. But I reckon I'd switch to Lazarus in the blink of an eye if they could fix up the GTK2 support.

Almindor
11-03-2006, 09:49 AM
I didn't know about that. I just tried it and it adds an identifying comment to the top of a class in the interface section. Is that right? That's neat fluff.

No you missed the point :)

It "completes" the implementation of your class/functions. Let me make example:


unit bla;

interface

type
TMyClass = class
private
function DoSomething: Integer;
public
constructor Create;
property Wow: Integer read GetWow write SetWow;
end;

implementation

end.


If I press ctrl+shift+c while my cursor is in that class that unit becomes:


unit bla;

interface

type
TMyClass = class
private
function GetWow: Integer; // autoadded
procedure SetWow(aValue: Integer); // autoadded
function DoSomething: Integer;
public
constructor Create;
property Wow: Integer read GetWow write SetWow;
end;

implementation

{ TMyCLass }

function TMyClass.GetWow: Integer;
begin

end;

procedure TMyClass.SetWow(aValue: Integer);
begin

end;

function TMyClass.DoSomething: Integer;
begin

end;

constructor TMyClass.Create;
begin

end;

end.


So it's basicly a code generator and let me tell your it saves ages of time :)
Not to mention other features like ctrl+click etc.[/quote]

WILL
11-03-2006, 03:06 PM
I'm guessing code refactoring is soon to come? :)

cragwolf
11-03-2006, 11:02 PM
Oh, OK, now I actually remember that from the last time I tested Lazarus. Bad memory. Well that feature is more than neat fluff, it really is time saving. It can get quite tedious retyping the function or procedure definition in the implementation section.

alexione
26-03-2006, 12:48 PM
I also use Lazarus, it's really nice piece of work! I didn't made any LCL-based apps yet, but as FPC IDE, it's really great (try also ctrl+shift+down/up, ctrl+shift+s). Someone even fixed few bugs I had reported! And great news is that after a long time, I can use debugger under win32!!! Try it - it worths!

marcov
08-04-2006, 01:58 PM
Oh, OK, now I actually remember that from the last time I tested Lazarus. Bad memory. Well that feature is more than neat fluff, it really is time saving. It can get quite tedious retyping the function or procedure definition in the implementation section.

Try ctrl-shift up/down in a function and alt-arrow up.

(btw these are also valid delphi shortcuts)

Frodlou
08-04-2006, 10:56 PM
So... the big question now... which has a debugger comparable to Delphi's?

I use d2k5 rather than fpc something like... 30% because of the ide, and 70% because the debugger. Also, d2k5 finally has inlines, was about time!

I tried lazarus over year ago and had a bunch of major issues with it.

Some specific details. I'm writing a multi-threaded app that is 100% original, no vcl or such thing. Do my own task management and thread syncing, timer and input and stuff. Lazarus always broke down while debugging some of the system stuff, plus i hated how it looked. From the other posts, i take the looks have improved, but the debugger?

In delphi 2k5, the debugger can handle over 90% of my debugging needs. It would crash/deadlock/slow to a crawl in some parts, but those parts are mostly done, so i rarely get funky fatal errors like before. Rest of the time, it's fast and friendly, as it should be.

The fpc ide was a bit rough, but it's debugger was so inneficient, that's why i left it.

Anyone tried delphi 2006 btw? How's the ide? Debugger? Inline support? Macro support? And what's that about reverse engineering???

WILL
09-04-2006, 08:55 AM
So... the big question now... which has a debugger comparable to Delphi's?

Lazarus, Lazarus, Lazarus! :D I used it just as I always have when I programed with Delphi. AND I;'ve been away for almost a month+ so... I can only imagine how much it's improved since I last updated it. ;)

I'd say that the debugging can very easily be compaired to Delphi 7 (as I have the most experience with the earlier mainstream Delphi and not the 2000 series. But, if you highlight some code and right click in the Editor you'll see some nice refactoring options right there much like what I saw in 2005! I don't know if it's implimented yet, I've not tried it myself (yeah yeah, call me chicken. ;))), but from the looks of things Lazarus is starting to come to a point where it'll be just as good as if you cracked open Delphi and started coding the exact same way.

Eventually such things as the filesize issue and whatever other quirks will get worked out. There might even be room for a Game Development version in the near future! :)


BTW... how do you get yourself off that darn mantius bug report mailing list? I think I might have accidentally put myself as a developer or something. My inbox is consistantly flooded with bug reports and all the problems Lazarus has. :roll: Nice to know, but damn inconvenient to be shoved into my inbox.

:lol: If I don't get off this mailing list soon, I'm gonna have to write a full review of Lazarus soon. ;)

marcov
09-04-2006, 05:11 PM
So... the big question now... which has a debugger comparable to Delphi's?

Lazarus, Lazarus, Lazarus! :D I used it just as I always have when I programed with Delphi. AND I;'ve been away for almost a month+ so... I can only imagine how much it's improved since I last updated it. ;)


(fpc 2.1.1 has an internal linker. Lazarus rebuilding itself takes 17 seconds here, with smartlinking, and experimental vtable smartlinking)

Seriously, Lazarus/FPC is getting closer and closer to Delphi. However that makes direct comparisons even less useful, since the equation extremely depends on what you want to do (and how much you want to spend, Delphi not being exactly cheap)

The debugger is still an issue though. Even when the current situation stabilises, I think D6/D7 still will be more stable debugging. (D2005 (fully patched), wasn't very stable here, and sometimes I regret spending the money, specially since Borland now denies me the downgrade rights their own sales person guaranteed)

In general, if you have the licenses, and are only interested in win32, Delphi will remain the best choice for a long time. OTOH Delphi shifts more and more too .NET, maybe FPC is even more viable for win32 longterm.

Specially now that the first win64 hello worlds are running......

WILL
09-04-2006, 08:27 PM
I'm dying to try the new updates. :) I'll have to check the Lazarus website sometime tonight.

Well a lot of Delphi factors could change now that it's being disassociated from Borland. The price is definately one factor. Another is all the 'wonderful' deals that Borland made with Microsoft. All agreements, unless more are made between the new company, will be null and void after the sell-off from Borland. I think whoever takes Delphi from Borland will make it a higher priority than it was up until now and in most cases it won't even be the same IDE suite that it once was or currently is.

Heck we might see a little power struggle between Lazarus and Delphi in the near future. :) The IDE people did go a bit silent once the porting Delphi to Mac and continuing Kylix topics came up. They even spend a small stint about the Mac possibility. Maybe a few secret ambitions were inspired during that podcast, no? :twisted:


Either way dispite the lack of alternatives to Lazarus, it's nice to see that the big one is coming along quite nicely. ;) And of course it is... why else would I have moved all my projects I still hold an interest in over to it.

While I was at sea I ported two older games over and updated them to be either shown(featured actually in my upcoming articles series on how to create games of it's genre) or released as a way for me to practice my AI ideas. Good fun!

Frodlou
12-04-2006, 04:22 AM
Marcov, i actually like d2005 better than 7. And i'm only using the code window, it's just more efficient i find. Never use refactoring and such things, i just like the pretty ide, and considering the number of hours a day i spend looking at it, it's an important thing for me.

Debugger is also a bit better. When i tried lazarus last year, i found i had trouble debugging message handling and threads when there were any syncing mechanisms in place, like mutexes or events. Never figured out why, but i had such problems with d2005 too, just way less frequently.

Now you got to try this if you're still having problems with your copy of delphi 2005. For some reason, i've had no stability issues at all since i did this. Got lucky i guess.

Step 1: Uninstall delphi 2005
Step 2: Install trial version of delphi 2005 from borland's web site

It will remember your settings from the initial install and not bother you with trial version stuff and registration. And work much much much better than the bought version patched.

Just try it, it works for me.

And fpc being as good as delphi is what i think too, but only on the compiler end. It's obviously better for multi-platform support, which is why i intend to migrate to it eventually, but in the mean time, i need a really solid win32 tool with the best debugger i can afford (money and time wise), so it will be delphi for me until i'm done with the heavy debugging tasks.

WILL
12-04-2006, 06:28 AM
Debugger is also a bit better. When i tried lazarus last year, i found i had trouble debugging message handling and threads when there were any syncing mechanisms in place, like mutexes or events. Never figured out why, but i had such problems with d2005 too, just way less frequently.

You can't compaire Lazarus last year to what it is like now. It's gone through so much development and improvements it's not funny. I noticed the HUGE improvement about a couple of months ago. The debugger works rather well, I find. I can use it just as well as I did Delphi's (Delphi 7, I've only tinkered with 2005 and not even tried 2006). Acts almost exactly like Delphi's debugger in most respects.

What exactly do you look for in a debugger anyhow? I mostly use the stop-watches and of course the messages myself. Not sure if I use much else than that. Besides the obviously awesome Source Editor's roll-over hints. ;)

Only downfall I noticed for stopping the program to checkout values with the mouse, is when you want to look for an array value or an object's property it won't show up. I'm sure with time these will become available though. In the meantime I have work-arounds. :)

Frodlou
20-04-2006, 12:48 AM
Ok, spent a few days testing out the newer lazarus and fpc, and i got to say, i'm impressed. It has indeed come a long way. I'm putting off buying d2k6 for a bit just in case, but in the end, there's a strong chance i'll still buy it, the trial impressed me greatly. However, as expected :((, it's got a bunch of bugs so...

One thing i really need that i didnt see thought, isnt there a way to see the cpu window?

marcov
27-04-2006, 09:15 AM
Ok, spent a few days testing out the newer lazarus and fpc, and i got to say, i'm impressed. It has indeed come a long way. I'm putting off buying d2k6 for a bit just in case, but in the end, there's a strong chance i'll still buy it, the trial impressed me greatly. However, as expected :((, it's got a bunch of bugs so...

One thing i really need that i didnt see thought, isnt there a way to see the cpu window?

If there is a GDB window somewhere in laz, try giving a "info registers" there.

Ingemar
25-05-2006, 06:02 PM
I wonder why people don't use Lazarus.

It has absolutly everything from code completion to refactoring the power of eclipse and it eats less than 20megs of RAM.

Don't get me wrong, I'm just curious as to what drives people elsewhere.
For me, it is a simple thing: The code editor. It has some very nonstandard behaviour, which is shares with the Turbo Pascal clone that comes with FPC. It was some time since I tried it, but as I remember it, clicking to the right of a line did not bring me to the end on that line, but to the place that I click, which I don't want. I think the arrow keys also did not work as expected.

This sounds trivial, but since I move a lot between different IDE's, an IDE that works strangely in something like that simply never gets comfortable. Mouse, arrow keys and ZXCV command keys simpy must follow the "Mac standard" (that is, like most Windows and Linux programs).

If you tell me that this is a setting that I can change, I would be happy to try again. If there is one thing I really need, it is a good cross-platform IDE for a good cross-platform Pascal.

Almindor
12-06-2006, 11:01 AM
Ah now I understand. However I think this IS configurable (if not in IDE then atleast in Synedit) so perhaps a wish-rep is in order.

I'm used to exactly the borland style. I can't stand tabs, non-free lines (eg you're jumping to end of line, not the space if you press up) etc.

But as I said I think it shouldn't be difficult for lazarus to get this "mac" optionized.