FreeBasic IDE-poseidonFB(Update 2024.03.03)

User projects written in or related to FreeBASIC.
Post Reply
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB

Post by Kuan Hsu »

Quick tutorial:
(1)
Goto http://www.freebasic.net/forum/viewtopi ... =8&t=22296, copy the "A PAINT PROGRAM" source code.

Run poseidonFB, setup the fbc path.(Option -> Preference -> set the Compiler Path -> click OK)
Click menu -> file -> new, then poseidonFB will create an empty file named "NoName#x.bas", paste the source code.
Click Quick Run, "A PAINT PROGRAM" will running
Image

This moment outline window show only file name --"NoName#x.bas", right-click tab-tag -> click "Refresh Parser"(or just press F2), poseidonFB will parse the source code then outline-tree be shown, we can edit the source code with auto-completion.

(2)
Sometimes we need pass options to compiler or pass args to exe, in poseidonFB, we can right-click the build-tool toolbar:
Image
A dialog will popup, key in the options and args, the click OK, the parameters will pass out.
Image

(3)
Before using debug set the debugger path first.(Option -> Preference -> set the debugger Path -> click OK)
Open the file or projects we want to debug, compile the file(s) with -g option, then Ctrl+L-Click the margin to mark the breakpoint(The marker is a red-rect):
Image

Click "Menu"->"Debug"->"Run Debug", then Debug window will show:
Image

Using the toolbar on console window to operate(ex: click "Run" start to debug), we can also key in the command in text on toolbar directlly.
Image
The right-top window is backtrace, double-click to select frame if we get multiple frames.
Image
Image

We can add variable in Watchlist by click green + button(like gdb display command), it will refresh every step automatically.
Image

Also we can evaluate the variable at Watchlist by double-click the variable:
Image
Last edited by Kuan Hsu on May 15, 2016 16:15, edited 3 times in total.
noop
Posts: 130
Joined: Sep 18, 2006 10:29

Re: FreeBasic IDE-poseidonFB

Post by noop »

I tried the IDE, it runs and I could compile&run the paint.bas. I will definitely follow this IDE's progress.

I didn't test it in depth and you're probably already aware of the following:

"Undo" deletes everything.

Setting the compiler path, you cannot move the cursor to the end of the line (it looks like the window is cut off).

Code folding doesn't seem to work.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FreeBasic IDE-poseidonFB

Post by sancho2 »

dodicat wrote:The ide leaves:

at the beginning of a source code.
This looks very much like a text file byte order mark.

Anyway...
I am anxious to try this IDE out, but have no time to look just yet.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FreeBasic IDE-poseidonFB

Post by sancho2 »

Had a chance to check this out.
I am using win 7, 64 bit.:
- IDE will load and I open a new source file. Type one letter (any letter) ok. Type the second letter and the IDE crashes.
- Opened an empty source file and pasted code in. It accepted it. Try to run code and error reports:
Execute file: C:/Users/Arcade/Documents/test/\xxx.exe
isn't exist......?

Run Error!
I cannot find any way to change the paths for exe location.
- Open options dialog to change compiler path and debug path. I was able to change compiler path but I could not change debug path. I had to go into the config file in the settings folder to finally change it.
- No browse option in setting the paths.
- Non sizeable window for path setting. Here is what it looks like on my machine:
Image
Now that I look at that image it looks like the auto completion is probably triggering the IDE crash. I will test... Yep. Autocompletion triggers my crash.

I will keep my eye on this IDE. You have a great start but right now it is unusable for me. I may try it on my xp machine later.
Thanks
noop
Posts: 130
Joined: Sep 18, 2006 10:29

Re: FreeBasic IDE-poseidonFB

Post by noop »

sancho2 wrote:- Opened an empty source file and pasted code in. It accepted it. Try to run code and error reports:
Execute file: C:/Users/Arcade/Documents/test/\xxx.exe
isn't exist......?

Run Error!
I cannot find any way to change the paths for exe location.
Did you press F5 as in FBIde? This only runs the already compiled executable. You have to press Shift+F5 to compile it first.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic IDE-poseidonFB

Post by St_W »

Kuan Hsu wrote:I've reupload the new version of poseidonFB which can set the font of Outline, Project...
The code had be re-written, please check it crash or not?
It still crashes (when double-clicking on any of the fonts in the list). Stacktrace looks similar (if not equal).
New Minidump: http://www.filedropper.com/poseidonfb_1
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB

Post by Kuan Hsu »

sancho2 wrote:Had a chance to check this out.
I am using win 7, 64 bit.:
.......
- Non sizeable window for path setting. Here is what it looks like on my machine:
It use "Courier New" font and Size=11, the font size is too big that out the dialog. But my OS is also win7 64bit!

The serious problem is :
In my code, I already set the font size = 9 !!!!

On my computer, the size always correct, but others are incorrect( maybe random ), so I'm afraid that D programming + IUP is not stable, I've tried the IupScintillaSendMessage(Ihandle* ih, uint iMessage, uptr_t wParam, sptr_t lParam) function to check it( On Win32 D programming language, the 4th param can't pass correctly, I used win32 SendMessage function instead)

1. WIN7 + DMD 1.076 + Tango + IUP......X
2. WIN7 + DMD 1.076 + Phobos + IUP......X (Unrelated standard library)
3. WIN7 + DMD 1.028 + Phobos + IUP......X
4. WIN7 + DMD 1.056 + Tango + IUP.......X
5. WIN7 + FreeBASIC-1.02.1-win32 + IUP......OK
6. Linux mint(ubuntu) + DMD 1.076 + Phobos......OK(!!!!!!!!????????)

It seems to WIN7 + DMD + IUP has problem! Maybe it cause the crash frequently(About memory management), on my computer everything seem to OK, but crash on others

I've no idea how to fix it, maybe just my code is too buggy and I need more check........................
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB

Post by Kuan Hsu »

St_W wrote: It still crashes (when double-clicking on any of the fonts in the list). Stacktrace looks similar (if not equal).
............................>"<.......................The problem about D + IUP?
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

Re: FreeBasic IDE-poseidonFB

Post by aurelVZAB »

well long time ago i download Poseidon editor from D programming site trying to use something for
C compiler and than editor work very well on my XP computer and i think that this old version
don't use iUP library..than win api....
so my question is why iUP ?
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB

Post by Kuan Hsu »

aurelVZAB wrote:well long time ago i download Poseidon editor from D programming site trying to use something for
C compiler and than editor work very well on my XP computer and i think that this old version
don't use iUP library..than win api....
so my question is why iUP ?
Poseidon IDE is an old good memory, it uses DMD 1.036 + DWT framework( Windows only)

The reason I use IUP:
1. Just for fun
2. For:
Image
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic IDE-poseidonFB

Post by St_W »

Kuan Hsu wrote:Poseidon IDE is an old good memory, it uses DMD 1.036 + DWT framework( Windows only)
According to http://wiki.dlang.org/List_of_GUI_Libraries DWT is also cross-platform, but it looks like IUP is a good choice. It is lightweight (in contrast to DWT) and runs on Windows and Linux while looking nice on each platform (in contrast to GTK).
IUP is also usable with FreeBasic while SWT (the base for DWT; Java) is not, which might also be beneficial. (E.g. it could allow IDE addins written in FB if the D-language interface (of the IDE) also supports that).
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB

Post by Kuan Hsu »

sancho2 wrote:Now that I look at that image it looks like the auto completion is probably triggering the IDE crash. I will test... Yep. Autocompletion triggers my crash
I've already change the preference window is resizable and change some code, please try it if you have time, thanks

Please try Autocompletion crash if load "A PAINT PROGRAM" or not, thanks
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FreeBasic IDE-poseidonFB

Post by sancho2 »

Kuan Hsu wrote:I've already change the preference window is resizable and change some code, please try it if you have time, thanks
Please try Autocompletion crash if load "A PAINT PROGRAM" or not, thanks
- Autocomplete still crashes the IDE even after loading the paint program.
- The preference window is now resizeable and I can see the browse buttons and everything else.
- I was not able to get a compile to work. I set the path to FBC.exe but get this error when compiling:
"C:\Program Files (x86)\FreeBASIC\fbc.exe" -c "C:\Users\Arcade\Documents\test\zzz"
error 80: Invalid command-line option, "C:\Users\Arcade\Documents\test\zzz"
- I don't see any way to change the compiler options.
- I have figured out why I can't compile. It seems the file name must be .bas. I opened a new file and saved it as zzz.bas (instead of zzz) and the compiler found it and I ran the paint program.
- There is no SaveAs option. There should be one.
- The New Project dialog should also be resizeable as I can't do anything in there either.
Thanks and keep at it Kuan.
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB

Post by Kuan Hsu »

sancho2 wrote: - Autocomplete still crashes the IDE even after loading the paint program.
- The preference window is now resizeable and I can see the browse buttons and everything else.
- I was not able to get a compile to work. I set the path to FBC.exe but get this error when compiling:
- I don't see any way to change the compiler options.
- I have figured out why I can't compile. It seems the file name must be .bas. I opened a new file and saved it as zzz.bas (instead of zzz) and the compiler found it and I ran the paint program.
- There is no SaveAs option. There should be one.
- The New Project dialog should also be resizeable as I can't do anything in there either.
Thanks and keep at it Kuan.
1. So the crash isn't cause by parser, it cause by the DMD send the param to iup call the scintilla function. I test on Linux mint 17.2 using LDC(llvm base compiler) and DMD, it crashed! But on my windows 7 is OK. I think the problem is D programming language's string convert to C string......
2. So the font size still too big....>"<
3.5. It compile only *.bas
4. Quick Run can't pass options to compiler, but project do
6. OK, got and add it!
7. OK, got and add it!( So the font size still too big......>"<)

I think that I should pause this project because it is too buggy. My original plan is using DMD+IUP to develop a cross-platform IDE( The poseidonFB was compiled success under linux mint 17.2, but it's more buggy ), I need to think how to continues this project, I should change the framework( the old D framework, like DWT or DFL, both for D programming language V1.0 ) but the IDE become win32 only, or change the language( ex. Freebasic or C++, but I didn't used them for many years... ) + IUP to keep the cross-platform or change the different framework( it takes much time )?

I think I got what the problem is, IUP function need C-style strings to pass parameters, but D can't turn its string( char[] ) to char* exactly( the string segment address seem too long then IUP crash ), so I write a class using the C typical malloc and memcpy function to pass the parameter to IUP, I need spent time to replace my code
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

Re: FreeBasic IDE-poseidonFB

Post by aurelVZAB »

well look i am not interested in linux version but i am interested for old version
what is DMD ...and what is DWT if is not wrapper for windows api calls ?
and is it possible to recompile old version with C compiler or i must use D compiler?
Post Reply