• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Issues with Free Pascal Compiler

Started by StefanZ, 2009.08.15, 05:19:51

Previous topic - Next topic

StefanZ

Hi.

I recently tried to use FPC for some pascal programming, specifically because FPC is quite compatible with Delphi syntax. That is how it happened, that at last I'm able to use pascal-based SDL (Jedi SDL) for pascal based SDL applications.

I run into trouble though, when tried to use multithreading on ma apps. It seems that no matter what I try the FPC is absolutely useless, even the basic threading does not work. Moreover, the debug output from apps seems to be useless as well. And on top of the things - FPC is able to compile only EMX based aplications.

Does anybody have any experience in using FPC and trouble shooting the above stated issues? :-[

Pete

Hi Stefanz

Sorry, never tried FPC...

I do use WDSibyl a bit though which is also "quite compatible with Delphi syntax"; the interface is similar to Delphi2 as well.

While I have not experimented with multithreading there is an example of using threads that seems to work.

Might be worth your time having a look at the current WDSibyl http://www.wdsibyl.org/

Regards

Pete

oli

I second that, FP has issues on all minor platforms (OS/2, Morphos etc) and has basically not seen any development on there for years.

WDSybil works but note that if you are doing multiplatform programming that the installer does not work on some newer Windows systems, noticeably on 64bit versions

StefanZ

#3
Thanks for your replies. :)

I do not care that much about multiplatform development, just the SDL on Pascal on OS/2 combo :)

Virtual Pascal is great, but is not being developed anymore (which is not such a big issue), but trying to run Jedi-SDL on VP seems to be impossible. I'm getting more/less same results with Jedi-SDL + WDSybil.

So Virtual Pascal and WDSibyl seem to be a no go for SDL on OS/2, although WDSibyl seems to be more compatible with JediSDL code. I will test WDSibyl more in the upcoming days.

Or, please make me happy and tell me that I'm missing some other - usually very obvious - way how to achieve Pascal-based  SDL support under OS/2/eCS ? :)

oli

Update FPC yourself ?

I am not trying to be funny......basically someone has to

StefanZ

So, to conclude the discussion,
there are two points that have to be clarified:

1) I'm an idiot ::)
2) the threading is working under FPC.

I managed to make the threads work (using API call DosCreateThread), but have to say, that by a total coincidence. I created a template threading program under WDSibyl, based on superb VirtualPascal documentation, and then - just for fun - tried to compile this VP/WDS source via FPC. And it worked, and worked quite well to my amazement. The point to make it work the right way is to use correct syntax and the right variable types.

To my defense I would also like to say - your honor :) -  that even the reference threading source code - using FPC internal function calls BeginThread - taken directly from FPC documentation >did not< work!!

oli

Could you document that and put it in a post somewhere ...... useful information