Recent

Author Topic: wince and synapse ?  (Read 12093 times)

mirce.vladimirov

  • Sr. Member
  • ****
  • Posts: 256
wince and synapse ?
« on: September 28, 2015, 12:29:07 am »
Am I doing something wrong or Synapse is only supported for intel (Linux and normal Windows)  ?
I added synapse to my WinCE application so I could transfer the sqlite to and from the PDA but cant compile, some error is reported :
Code: [Select]
C:\lazarus\components\synapse40\source\lib\asn1util.pas(66,4) Warning: Illegal identifier "IMPLICIT_STRING_CAST" for $WARN directive
C:\lazarus\components\synapse40\source\lib\asn1util.pas(67,4) Warning: Illegal identifier "IMPLICIT_STRING_CAST_LOSS" for $WARN directive
C:\lazarus\components\synapse40\source\lib\synautil.pas(65,4) Warning: Illegal identifier "IMPLICIT_STRING_CAST" for $WARN directive
C:\lazarus\components\synapse40\source\lib\synautil.pas(66,4) Warning: Illegal identifier "IMPLICIT_STRING_CAST_LOSS" for $WARN directive
C:\lazarus\components\synapse40\source\lib\synautil.pas(67,4) Warning: Illegal identifier "SUSPICIOUS_TYPECAST" for $WARN directive
synautil.pas(0,0) Fatal: Can not find unit UnixUtil used by synautil.

What should I use then ? Indy or Lnet ? What's preffered in Laz for WinCE ?
 

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: wince and synapse ?
« Reply #1 on: September 28, 2015, 12:22:08 pm »
I haven't tried myself, but I believe I have heard of others that use Synapse on a WinCE device.

As for the quoted output. The first five lines of output are just warnings regarding $WARN messages, so those can be ignored.

The "can't find unit UnixUtils" on a WinCE device. That tells me you need to fix the IFDEF statements. There is probably a IFDEF MSWINDOWS .... ELSE  .... and for your WinCE platform, it drops to the ELSE portion.

See the Free Pascal Programmers Guide regarding available compiler defines:
  http://www.freepascal.org/docs-html/prog/progap7.html#x333-348000G

The IFDEF MSWINDOWS probably needs to change to IFDEF WINDOWS, which will include the WinCE platform. MSWINDOWS only includes desktop Windows, not mobile Windows.

ps:
I didn't actually look at the Synapse code, I'm just commenting based on experience and the error messages you listed.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: wince and synapse ?
« Reply #2 on: September 28, 2015, 12:55:51 pm »
Maybe of interest:
http://forum.lazarus.freepascal.org/index.php/topic,5746.msg26958.html#msg26958
Quote
I have found, that Synapse ( http://synapse.ararat.cz/doku.php ) was ported
on WinCE ( http://www.db-gonzales.de/download/WinCETools.zip ).
I´m testing it right now.

lNet-components looks good too.
But that's a version from 2007/2008.

Also... what version did you take?
In the latest trunk version there are some signs of WINCE-defs.
Code: [Select]
    {$IFDEF WINCE}
      {$I sswin32.inc}  //not complete yet!
    {$ELSE}
and
Code: [Select]
  {$IFDEF WINCE}
    DLLStackName = 'ws2.dll';
  {$ELSE}
But apparently it's not complete yet. (Work in progress? But the trunk hasn't changed since feb.2015)

So try the version in WinCETools.zip otherwise maybe LNet is a better way to go for WINCE.
« Last Edit: September 28, 2015, 12:58:32 pm by rvk »

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: wince and synapse ?
« Reply #3 on: September 28, 2015, 01:15:38 pm »
It was many years ago now but I have used LNet on WinCE and it worked reliably.

mirce.vladimirov

  • Sr. Member
  • ****
  • Posts: 256
Re: wince and synapse ?
« Reply #4 on: September 28, 2015, 03:13:05 pm »
Synapse is release 40 from 2012 (see http://synapse.ararat.cz/doku.php). Just downloaded yesterday.
For me synapse is a lot simpler than Lnet, but it seems i would have to use Lnet.
About These WinCETools, what shoud i do with it, just paste to my projects directory and include them to "uses" ? Because there is at least one file with a name of an existing one in the Synapse sources folder so I dont believe it's a good idea to paste them there, right ? Also, these are older than Synapse's original.

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: wince and synapse ?
« Reply #5 on: September 28, 2015, 03:23:09 pm »
Synapse is release 40 from 2012 (see http://synapse.ararat.cz/doku.php). Just downloaded yesterday.
Yes, but that's a very old version.
If you're going to use Synapse you better use the more recent (and still stable) trunk version:
http://sourceforge.net/p/synalist/code/HEAD/tree/trunk/
(you can use the "Download snapshot" button above the files.)

But still. That doesn't have complete WINCE support but for Desktop development it's best you use that snapshot version.

About These WinCETools, what shoud i do with it, just paste to my projects directory and include them to "uses" ? Because there is at least one file with a name of an existing one in the Synapse sources folder so I dont believe it's a good idea to paste them there, right ? Also, these are older than Synapse's original.
Those 5 files are the only files changed. For example sswince.pas uses SynObjs.pas so you still need all the other files. So yes, you need to copy them over the existing ones. But I'm not sure with what version these work best. But the synsock.pas doesn't matter much. It's just a few IFDEFs so you can copy the one from WinCETools over the original. Try it with the snapshot/trunk version and see if it compiles.

mirce.vladimirov

  • Sr. Member
  • ****
  • Posts: 256
Re: wince and synapse ?
« Reply #6 on: September 29, 2015, 09:18:01 pm »
It was many years ago now but I have used LNet on WinCE and it worked reliably.

Lnet's ftp.put works OK but ftp.retrieve does not.  It gets messed up somehow and downloads only parts of the file and sometimes even sudenly breaks during filling the stream. Also, it is quite complicated to understand Lnet. On the other hand, Synapse is both simple and powerful but it lacks WinCE support.

 

TinyPortal © 2005-2018