Recent

Author Topic: [RESOLVED] Compiler conditionals for ymofen msgpack-delphi  (Read 4019 times)

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
[RESOLVED] Compiler conditionals for ymofen msgpack-delphi
« on: August 20, 2016, 01:20:39 am »
Hi, I am trying (with no sucess) to compile a delphi MsgPack porting into lazarus-free-pascal (www.msgpack.org).

At first, I tried to auto import the delphi project to a lazarus project. Then hit "F9".  ::)

Then, I tried to tackle some of the compiler conditionals until I found I know nothing about how define conditionals through the IDE.

Anyone had any luck with this one? Any alternatives?

Code: Pascal  [Select][+][-]
  1. Compile Project, Target: prjPackAndUnPack: Exit code 256, Errors: 4
  2. SimpleMsgPack.pas(93,7) Error: Incompatible types: got "AnsiString" expected "Int64"
  3. SimpleMsgPack.pas(93,7) Error: Compile time expression: Wanted Boolean but got <erroneous type> at IF or ELSEIF
  4. SimpleMsgPack.pas(97,7) Error: Incompatible types: got "AnsiString" expected "Int64"
  5. SimpleMsgPack.pas(97,7) Error: Compile time expression: Wanted Boolean but got <erroneous type> at IF or ELSEIF
  6.  
« Last Edit: August 26, 2016, 06:00:01 pm by carlitus »
Be mindful and excellent with each other.
https://github.com/cpicanco/

derek.john.evans

  • Guest
Re: Compiler conditionals
« Reply #1 on: August 20, 2016, 04:10:51 am »
Maybe post where you got the source code next time  :D

Ok, so, you want to compile SimpleMsgPack.pas

Adding this to the top is required:
Code: Pascal  [Select][+][-]
  1. {$mode delphi}
  2. {$MACRO ON}
  3. {$define RTLVersion :=  25}
  4. {$define CompilerVersion := 18}    
  5.  

Note, the 25&18 are just any number to get it compiling.

FreePascal doesn't like the Byte to Boolean conversions, so add this type:

Code: Pascal  [Select][+][-]
  1. type
  2.   PBOOLEAN = ^ByteBool;  
  3.  

SimpleMsgPack should compile, but, I have no idea if it will work.

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Compiler conditionals
« Reply #2 on: August 20, 2016, 05:43:00 pm »
First of all, I am very sorry about missing the source link, here it is: https://github.com/ymofen/msgpack-delphi

Thank you Geepster, I will test this out.

Right now I am trying another simpler porting that at least have compiled: https://github.com/arthurprs/msgpack-delphi

Best,
Rafael
Be mindful and excellent with each other.
https://github.com/cpicanco/

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Compiler conditionals
« Reply #3 on: August 26, 2016, 05:58:57 pm »
Hi all,

Please, take a look here: https://github.com/ymofen/msgpack-delphi/issues/2
Be mindful and excellent with each other.
https://github.com/cpicanco/

 

TinyPortal © 2005-2018