Recent

Author Topic: Installing sgcWebSockets library but it doesn't detect Indy files - Ubuntu  (Read 3851 times)

negagen

  • New Member
  • *
  • Posts: 13
I was installing the sgcWebSokets library but when i try to compile it says that it doesn't found the IdGlobal unit, i installed de Indy library trying to fix this, but it keeps poping the same error, another question, is how i add the indy library in the paths on the package installation, in the routes added to the library there are ../Lazarus/Indy and ../Source but i don't know if this is correct, so please help guys!! Y-Y .
« Last Edit: July 23, 2018, 08:41:54 am by negagen »

negagen

  • New Member
  • *
  • Posts: 13
Well i rewrote the path (remove then and added them again) in the sgcWebSockets library and it detected de IdGlobal unit but another error happened, now it doesn't find the IdCoderMIME unit, so i tried installing indy but it doesn't got fixed, so i tried mounting lazarus and sgcWebSockets in another computer a reinstall allagain, got the same notice 'doesn't find the IdGlobal' but rewriting the path worked again and again got the doesn't fin the IdCoderMIME, looking about this unit is in dclindyprotocols or dclindycore but i can't install it because id needs another library indycorelaz or indysystemlaz.
« Last Edit: July 23, 2018, 01:53:37 am by negagen »

negagen

  • New Member
  • *
  • Posts: 13
I have installed dclindycore and dclindysystem removing the dependecies but didn't change anything if something i realize that the error is incompatible IdCodeMIME.ppu or something like that and not that doesn't find it, but even using the IdCodeMIME that is in the sgcWebSocket zip (it has indy included), it stays the same.

balazsszekely

  • Guest
Hi negagen,

Indy 10.5.8 is very old, you should download a newer version(10.6 series)
1. SVN: https://svn.atozed.com:444/svn/Indy10
2. Nightly build: https://indy.fulgan.com/ZIP/
3. OPM: https://packages.lazarus-ide.org/Indy10.zip

negagen

  • New Member
  • *
  • Posts: 13
Ok i installed the last version of indy that you give, and same problem so after this post :

http://forum.lazarus-ide.org/index.php?topic=33984.0

I found that it appears that unix is case-sensitive, so i had to modify the code of the library from IdCodeMime to IdCodeMIME but now i had another error that it says it couldn't open an sgcResources.res file or something like that right now i'm uncompressing again the library because i had changed a few things so maybe is that if the error persist i will write it here, by the way i downgrade to the 1.6.4 version of lazarus because in the install readme says that the library was tested in 1.6.4 version of lazarus but there wasn't any diference.
« Last Edit: July 23, 2018, 09:05:08 am by negagen »

negagen

  • New Member
  • *
  • Posts: 13
Well the error was the same the file was called in the directory sgcResources.RES and in the message windows showed sgcResources.res, after changing the name of the file to .res it worked, now for some reason i had an error with the Indy library IdAboutVLC ppu incompatible...

so a review what i have done until now:

* Rewrite the paths for other units in the package will show that IdGlobal unit is not found.
* Rewrite the unit in the Uses statement of the library because case sensitive issues.
* Rewrite the file name of sgcResources.RES to sgcResources.res because if not the compiler will not find it.

EDIT: the paths doesn't work because its stated in the package as /Lazarus/indy and the path is /Lazarus/Indy so is another case of case-sensitive.
« Last Edit: July 23, 2018, 07:52:53 am by negagen »

negagen

  • New Member
  • *
  • Posts: 13
Well now i installed Indy and removed the path ../Lazarus/Indy and it worked i finally could install it... but now has another issue i don't know if open another thread for this... i got the error Runtime(232)... i was testing the library with a project i worked before in windows.. but in this thread:

http://forum.lazarus.freepascal.org/index.php?topic=7017.0

says that i had to add -dUseCThreads in the usage options (don't know where is that) of the package... i haven't tested it because i don't know where that usage options are...

balazsszekely

  • Guest
Just open your project file(Menu-->Project-->View Project Source) then add the following line:
Code: Pascal  [Select][+][-]
  1. program Project1;
  2.  
  3. {$mode objfpc}{$H+}
  4. {$DEFINE UseCThreads}  //<-- this one
  5. uses
  6.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  7.   cthreads,
  8.   {$ENDIF}{$ENDIF}
  9.   Interfaces,
  10.   Forms, unit1;
  11.  
  12. {$R *.res}    
  13. ....

negagen

  • New Member
  • *
  • Posts: 13
Ok here a photo of where i had to put the UseCThreads options the -d is automatically added, i have compiled and build the IDE but the error was still there, after doing what  GetMem said and adding
Code: Pascal  [Select][+][-]
  1. {$DEFINE UseCThreads}
it worked but now i got a different error but it looks like is a different thing, i uploaded the photo of the error too, i have wasted a day troubleshooting this and i'm tired so i will leave it for today tomorrow i will keep trying to make it work...
« Last Edit: July 23, 2018, 09:06:36 am by negagen »

negagen

  • New Member
  • *
  • Posts: 13
This thread could be close because i had already install the library i will open another thread for the Indy error i'm getting thanks for the help.

Solution:

pay attention to the path routes and file names are the same (even the unit that you call) because even if free pascal compiler is not case-sensitive unix is (and as a result linux too).

 

TinyPortal © 2005-2018