Recent

Author Topic: Linux & indy  (Read 12739 times)

cd

  • Jr. Member
  • **
  • Posts: 54
Linux & indy
« on: March 10, 2010, 02:04:23 am »
do they work together?
today i tried to move two the projects with indy to linux and failed
one of them outputs an error RE211 at initialization stage
the other runs but doesn't connect anywhere saying "Semaphore init failed (possibly too many concurrent threads)"
both applications were created with lazarus and worked fine on windows
i will certainly investigate it deeper myself, but maybe someone already knows what to do with this?

shanbaum

  • Newbie
  • Posts: 4
Re: Linux & indy
« Reply #1 on: March 25, 2010, 04:35:33 pm »
You may have already found this, but for others looking in the thread...

http://wiki.lazarus.freepascal.org/Lazarus_Faq#Lazarus_crashes_with_runtime_error_211_after_I_installed_a_component

I hit roughly the same issue as you until ensuring that cthreads was the first in the uses list.

cd

  • Jr. Member
  • **
  • Posts: 54
Re: Linux & indy
« Reply #2 on: March 26, 2010, 11:33:23 am »
shanbaum
thank you

actually i didn't find and answer yet, so this helped.

for those who are interested in a quick decision here it is.
if you create a new project there is a block of code in project1.lpr
Code: [Select]
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
so one has only to wipe out {$IFDEF UseCThreads} or define {$DEFINE UseCThreads}. i decided to modify it the second way
Code: [Select]
{$DEFINE UseCThreads}
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}

 

TinyPortal © 2005-2018