EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SBB compile with Free Pascal

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#18957
Posted: 02/07/2012 00:22:32
by DWS DWS (Priority Standard support level)
Joined: 02/24/2011
Posts: 17

Hi all,

SBB Source Code: v9.1.214 Linux source
Free Pascal: 2.6.0 for Mac OS

I'm trying to generate dylib file(s) to use for a Delphi XE2 firemonkey application. My first step is to try and compile the BaseBBoxLinux.pp with FreePascal but unable to do so.

Initially, compilation fails to see where pas files are. I modified the BaseBBoxLinux.pp to reference some of the SB***.pas files in the correct location. Compilation now sees the source files, but I encountered a compile error on SBUtils.pas. The error was the unit "DATEUTILS" was defined more than once.

I've played around with different conditional defines during compilation but can't seem to get the correct combination.

Any help/tips on how I can compile with Free Pascal and eventually generate a dylib for a Mac application will be greatly appreciated.

Thanks,
DWS
#18958
Posted: 02/07/2012 00:35:54
by Eugene Mayevski (EldoS Corp.)

All I can say at the moment is that SBB was built from current source code for iOS using FPC 2.6.0 without changes in SBB BUT with changes in FPC build scripts.
I hope that the person which did this would respond here with more details.

We will check and ensure out-of-the-box compatibility of SBB with FPC 2.6 in SecureBlackbox 10.


Sincerely yours
Eugene Mayevski
#18959
Posted: 02/07/2012 04:06:41
by Santiago Castaño (Standard support level)
Joined: 04/16/2006
Posts: 155

#18960
Posted: 02/07/2012 04:07:36
by Santiago Castaño (Standard support level)
Joined: 04/16/2006
Posts: 155

Hi,

We've made an iPhone Application (KSI VerifyPDF) successfully with SBB and FPC 2.6.0. (Also made some MacOsX apps)

For the FPC build scripts, as Eugene says with current FPC 2.6.0 XCode Template it gave me some errors (lack of directories, doesn't look where it should, etc...), so i modified it to this:
Code
set -e
if [ $PLATFORM_NAME = "iphonesimulator" ]; then
OUT_FILES="-FU'$OBJECT_FILE_DIR_normal/$CURRENT_ARCH' -o'$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME'"
CMD_LINE="$FPC_SIM_COMPILER $FPC_COMMON $FPC_CONFIG $FPC_SIM_UNITS $FPC_SIM $OUT_FILES $FPC_MAIN_FILE"
echo $CMD_LINE
$CMD_LINE
$PLATFORM_DEVELOPER_BIN_DIR/libtool -static -o "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME" `grep "\.o$" $BUILT_PRODUCTS_DIR/link.res`
else
if [ ! -d "$OBJECT_FILE_DIR_normal" ]; then
mkdir "$OBJECT_FILE_DIR_normal"
fi
if [ ! -d "$OBJECT_FILE_DIR_normal/armv6" ]; then
mkdir "$OBJECT_FILE_DIR_normal/armv6"
fi
if [ ! -d "$OBJECT_FILE_DIR_normal/armv7" ]; then
mkdir "$OBJECT_FILE_DIR_normal/armv7"
fi
if [ ! -d "$BUILT_PRODUCTS_DIR" ]; then
mkdir "$BUILT_PRODUCTS_DIR"
fi
OUT_FILES="-FU'$OBJECT_FILE_DIR_normal/armv6' -o'$OBJECT_FILE_DIR_normal/armv6/$EXECUTABLE_NAME'"
CMD_LINE="$FPC_ARM_COMPILER $FPC_COMMON $FPC_CONFIG $FPC_ARM_UNITS $FPC_ARMV6 $OUT_FILES $FPC_MAIN_FILE"
echo $CMD_LINE
eval $CMD_LINE
$PLATFORM_DEVELOPER_BIN_DIR/libtool -static -arch_only armv6 -o "$OBJECT_FILE_DIR_normal/armv6/$EXECUTABLE_NAME" `grep "\.o$" "$OBJECT_FILE_DIR_normal/armv6/link.res"`
OUT_FILES="-FU'$OBJECT_FILE_DIR_normal/armv7' -o'$OBJECT_FILE_DIR_normal/armv7/$EXECUTABLE_NAME'"
CMD_LINE="$FPC_ARM_COMPILER $FPC_COMMON $FPC_CONFIG $FPC_ARM_UNITS $FPC_ARMV7 $OUT_FILES $FPC_MAIN_FILE"
echo $CMD_LINE
eval $CMD_LINE
$PLATFORM_DEVELOPER_BIN_DIR/libtool -static -arch_only armv7 -o "$OBJECT_FILE_DIR_normal/armv7/$EXECUTABLE_NAME" `grep "\.o$" "$OBJECT_FILE_DIR_normal/armv7/link.res"`
$PLATFORM_DEVELOPER_BIN_DIR/libtool -static "$OBJECT_FILE_DIR_normal/armv6/$EXECUTABLE_NAME" "$OBJECT_FILE_DIR_normal/armv7/$EXECUTABLE_NAME" -o "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME"
echo "actual: $BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME"
#copiamos...
if [ ! -d "$BUILT_PRODUCTS_DIR/. ./. ./IntermediateBuildFilesPath/UninstalledProducts" ]; then
mkdir -p "$BUILT_PRODUCTS_DIR/. ./. ./IntermediateBuildFilesPath/UninstalledProducts"
fi
cp "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME" "$BUILT_PRODUCTS_DIR/. ./. ./IntermediateBuildFilesPath/UninstalledProducts/$EXECUTABLE_NAME"
fi
SIM_LIB=$BUILD_DIR/$CONFIGURATION-iphonesimulator/$EXECUTABLE_NAME
ARM_LIB=$BUILD_DIR/$CONFIGURATION-iphoneos/$EXECUTABLE_NAME
if [ -e "$SIM_LIB" ]; then
if [ -e "$ARM_LIB" ]; then
$PLATFORM_DEVELOPER_BIN_DIR/libtool -static "$ARM_LIB" "$SIM_LIB" -o "$PROJECT_DIR/$EXECUTABLE_NAME"
fi
fi


I attach also 2 images showing you how to configure the compilation stage of the dylib.

My SBB sources in this project are in /VerifyPDF/Sources. I also use Synapse library located in /VerifyPDF/Synapse (your problem with missing units must come from a missing -Fu switch).

The problem you have with SBUtils.pas is strange as dateutils is only defined once in my current SBUtils.pas, maybe i've modified it and haven't said the changes to Eldos people.

If you have any problems, post in this thread, i'll take a look at it and help you to accomplish the task of compiling your sources.
#18961
Posted: 02/07/2012 04:09:20
by Santiago Castaño (Standard support level)
Joined: 04/16/2006
Posts: 155

Image 1


#18962
Posted: 02/07/2012 04:11:44
by Santiago Castaño (Standard support level)
Joined: 04/16/2006
Posts: 155

Image 2


#18963
Posted: 02/07/2012 04:12:33
by Santiago Castaño (Standard support level)
Joined: 04/16/2006
Posts: 155

I put my SecBBox.inc. As it's just the include file i hope Eldos doesn't kill me for putting it here :)
Code

{$DEFINE LINUX}
{$Q-}
{$R-}
{$DEFINE FPC}

(****************************************

Compiler- and platform-specific defines

****************************************)

{$ifndef CHROME}
   {$ifdef OXYGENE}
      {$define CHROME}
   {$endif}
   {$ifdef PRISM}
      {$define CHROME}
   {$endif}
{$endif}

{$ifdef CHROME}
   {$ifndef CLR}
      {$define CLR}
   {$endif}
{$endif}

{$ifdef CLR}
    {$DEFINE DELPHI_NET}
    {$define SB_NO_COMPONENT}  // Removes TComponent dependency in some units
    {$DEFINE NET_registered}
    {$define SB_NET_DESKTOP}
{$endif}

{$ifdef MONO}
  {$undef SB_NET_DESKTOP}
{$endif}

{$ifdef NET_CF}
  {$undef SB_NET_DESKTOP}
{$endif}

{$ifdef SILVERLIGHT}
  {$undef SB_NET_DESKTOP}
{$endif}

{$ifndef DELPHI_NET}
    {$ifndef WIN32}
        {$ifndef LINUX}
            {$define WIN32}
        {$endif}
    {$endif}
{$endif}

{$ifdef CHROME}
   {$ifndef DELPHI_NET}
      {$define DELPHI_NET}
   {$endif}
{$endif}

{$ifdef WIN32}
{$define SB_X86ASM}
{$endif}

// by default we are on 32-bit CPU
{$define SB_CPU32}

{$ifdef CPU64}
{$define SB_CPU64}
{$undef SB_CPU32}
{$undef SB_X86ASM}
{$endif}

{$ifndef CLR}
  {$ifndef FPC}
    {$define DELPHI_WIN}
  {$endif}
{$endif}

{$ifdef DELPHI_NET}
{$undef SB_ACTIVEX_MODE}
{$endif}

{$IFDEF FPC} // set mode only with FreePascal, since Delphi doesn't know it
  {$MODE DELPHI}
{$DEFINE VER140}
{$ENDIF FPC}


{$ifdef LINUX}
  {$define KYLIX_USED}
  {$define CLX_USED}
{$else}
  {$define MSWINDOWS}
{$endif}

{$ifndef CHROME}
  {$ifndef FPC}
    {$Q-,R-,I-,J-}
  {$endif}
{$endif}


(****************************************

VCL version checks

****************************************)


{$IFDEF VER120}
  {$DEFINE D_3_UP}
  {$DEFINE D_4_UP}
  {$DEFINE VCL40}
{$ENDIF}

{$IFDEF VER125}
  {$DEFINE B_3_UP}
  {$DEFINE B_4_UP}
  {$DEFINE B_4}
  {$DEFINE VCL40}
  {$DEFINE BUILDER_USED}
{$ENDIF}

{$IFDEF VER130}
   {$IFDEF BCB}
      {$DEFINE B_3_UP}
      {$DEFINE B_4_UP}
      {$DEFINE B_5_UP}
      {$DEFINE B_5}
      {$DEFINE VCL40}
      {$DEFINE VCL50}
      {$DEFINE BUILDER_USED}
    {$ELSE}
      {$DEFINE D_3_UP}
      {$DEFINE D_4_UP}
      {$DEFINE D_5_UP}
      {$DEFINE VCL40}
      {$DEFINE VCL50}
      {.DEFINE USEADO}
    {$ENDIF}
{$ENDIF}

{$IFDEF VER140}
   {$IFDEF BCB}
      {$DEFINE B_3_UP}
      {$DEFINE B_4_UP}
      {$DEFINE B_5_UP}
      {$DEFINE B_6_UP}
      {$DEFINE B_6}
      {$DEFINE VCL40}
      {$DEFINE VCL50}
      {$DEFINE VCL60}
      {$DEFINE BUILDER_USED}
    {$ELSE}
      {$DEFINE D_3_UP}
      {$DEFINE D_4_UP}
      {$DEFINE D_5_UP}
      {$DEFINE D_6_UP}
      {$DEFINE D_6}
      {$DEFINE VCL40}
      {$DEFINE VCL50}
      {$DEFINE VCL60}
      {.DEFINE USEADO}
    {$ENDIF}
{$ENDIF}


{$IFDEF VER150}
   {$IFNDEF BCB}
      {$DEFINE D_3_UP}
      {$DEFINE D_4_UP}
      {$DEFINE D_5_UP}
      {$DEFINE D_6_UP}
      {$DEFINE D_7_UP}
      {$DEFINE D_7}
      {$DEFINE VCL40}
      {$DEFINE VCL50}
      {$DEFINE VCL60}
      {$DEFINE VCL70}
      {.DEFINE USEADO}
    {$ENDIF}
{$ENDIF}

{$IFDEF VER160}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_8}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {.$DEFINE USE_NAME_SPACE} // Optional !!!
{$ENDIF}

{$IFDEF VER170}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_9_UP}
    {$DEFINE D_9}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {$DEFINE VCL90}
    {.$DEFINE USE_NAME_SPACE} // Optional !!!
{$ENDIF}

{$IFDEF VER180}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_9_UP}
    {$DEFINE D_X_UP}
    {$DEFINE D_X}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {$DEFINE VCL90}
    {$DEFINE VCL100}

    {$DEFINE B_3_UP}
    {$DEFINE B_4_UP}
    {$DEFINE B_5_UP}
    {$DEFINE B_6_UP}
    {$DEFINE B_X_UP}
    {$DEFINE B_X}
    {$ifndef DELPHI_NET}       
    {$DEFINE BUILDER_USED}
    {$endif}
{$ENDIF}

{$IFDEF VER185}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_9_UP}
    {$DEFINE D_X_UP}
    {$DEFINE D_11_UP}
    {$DEFINE D_11}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {$DEFINE VCL90}
    {$DEFINE VCL100}
    {$DEFINE VCL110}
  {$IFDEF BCB}
    {$DEFINE B_3_UP}
    {$DEFINE B_4_UP}
    {$DEFINE B_5_UP}
    {$DEFINE B_6_UP}
    {$DEFINE B_X_UP}
    {$DEFINE B_11_UP}
    {$DEFINE B_11}
    {$ifndef DELPHI_NET}       
    {$DEFINE BUILDER_USED}
    {$endif}
  {$ENDIF}
{$ENDIF}

{$IFDEF VER200}
{$ifndef CHROME}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_9_UP}
    {$DEFINE D_X_UP}
    {$DEFINE D_11_UP}
    {$DEFINE D_12_UP}
    {$DEFINE D_12}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {$DEFINE VCL90}
    {$DEFINE VCL100}
    {$DEFINE VCL110}
    {$DEFINE VCL120}
  {$IFDEF BCB}
    {$DEFINE B_3_UP}
    {$DEFINE B_4_UP}
    {$DEFINE B_5_UP}
    {$DEFINE B_6_UP}
    {$DEFINE B_X_UP}
    {$DEFINE B_11_UP}
    {$DEFINE B_12_UP}
    {$DEFINE B_12}
    {$ifndef DELPHI_NET}
    {$DEFINE BUILDER_USED}
    {$define SB_EXCLUDE_EL_ALIASES}
    {$endif}
  {$ENDIF}

  {$ifdef UNICODE}
    {$define SB_UNICODE_VCL}
  {$endif}
{$endif}
{$ENDIF}

{$IFDEF VER210}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_9_UP}
    {$DEFINE D_X_UP}
    {$DEFINE D_11_UP}
    {$DEFINE D_12_UP}
    {$DEFINE D_14_UP}
    {$DEFINE D_14}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {$DEFINE VCL90}
    {$DEFINE VCL100}
    {$DEFINE VCL110}
    {$DEFINE VCL120}
    {$DEFINE VCL130}
    {$DEFINE VCL140}
  {$IFDEF BCB}
    {$DEFINE B_3_UP}
    {$DEFINE B_4_UP}
    {$DEFINE B_5_UP}
    {$DEFINE B_6_UP}
    {$DEFINE B_X_UP}
    {$DEFINE B_11_UP}
    {$DEFINE B_12_UP}
    {$DEFINE B_14_UP}
    {$DEFINE B_14}
    {$ifndef DELPHI_NET}
    {$DEFINE BUILDER_USED}
    {$define SB_EXCLUDE_EL_ALIASES}
    {$endif}
  {$ENDIF}
  {$ifdef UNICODE}
    {$define SB_UNICODE_VCL}
  {$endif}
{$ENDIF}

{$IFDEF VER220}
    {$DEFINE D_3_UP}
    {$DEFINE D_4_UP}
    {$DEFINE D_5_UP}
    {$DEFINE D_6_UP}
    {$DEFINE D_7_UP}
    {$DEFINE D_8_UP}
    {$DEFINE D_9_UP}
    {$DEFINE D_X_UP}
    {$DEFINE D_11_UP}
    {$DEFINE D_12_UP}
    {$DEFINE D_14_UP}
    {$DEFINE D_15_UP}
    {$DEFINE D_15}
    {$DEFINE VCL40}
    {$DEFINE VCL50}
    {$DEFINE VCL60}
    {$DEFINE VCL70}
    {$DEFINE VCL80}
    {$DEFINE VCL90}
    {$DEFINE VCL100}
    {$DEFINE VCL110}
    {$DEFINE VCL120}
    {$DEFINE VCL140}
    {$DEFINE VCL150}
  {$IFDEF BCB}
    {$DEFINE B_3_UP}
    {$DEFINE B_4_UP}
    {$DEFINE B_5_UP}
    {$DEFINE B_6_UP}
    {$DEFINE B_X_UP}
    {$DEFINE B_11_UP}
    {$DEFINE B_12_UP}
    {$DEFINE B_14_UP}
    {$DEFINE B_15_UP}
    {$DEFINE B_15}
    {$ifndef DELPHI_NET}
    {$DEFINE BUILDER_USED}
    {$define SB_EXCLUDE_EL_ALIASES}
    {$endif}
  {$ENDIF}
  {$ifdef UNICODE}
    {$define SB_UNICODE_VCL}
  {$endif}
{$ENDIF}

{$ifndef CHROME}
  {$ifndef DELPHI_NET}
    {$IFDEF D_7_UP}
      {$WARN UNSAFE_CODE OFF}
      {$WARN UNSAFE_TYPE OFF}
      {$WARN UNSAFE_CAST OFF}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

{$ifdef BUILDER_USED}
  {$OBJEXPORTALL ON}
{$endif}


(****************************************

SecureBlackbox defines

****************************************)

{.$define SB_EVAL}

{.$DEFINE SECURE_BLACKBOX_DEBUG}

// Deflate64 compression algorithm support
{$define SB_DEFLATE64}

{$DEFINE SB_NTLM_SUPPORT}

// GOST cryptoalgorithm support
{$define SB_HAS_GOST}

// ECC cryptoalgorithm support
{$define SB_HAS_ECC}

// support for CJK and other complex charsets
{$DEFINE COMPLEXENCODING_SUPPORT}

// XML must use Charset library
{$define SB_XML_USE_CHARSETS}

// include ability to create self-extractable pgp-encrypted files
{$define SB_PGPSFX}

// the following must be defined ONLY WHILE a stub for pgp sfx is being built
// this is supported for Win32 platform only
{.$define SB_PGPSFX_STUB}

// include IPv6 support
{$define SB_IPv6}

// include DNSSEC support
{$define SB_DNSSEC}

// include GSSAPI
{$define SB_GSSAPI}

// include CryptoAPI and Windows Certificate Storage
{$define SB_HAS_WINCRYPT}

// default parameters enabled
{$define HAS_DEF_PARAMS}

// optional defines to exclude certain algorithms
{.$define SB_NO_BZIP}
{.$define SB_NO_DES}
{.$define SB_NO_RC2}
{.$define SB_NO_RC4}
{.$define SB_NO_IDEA}
{.$define SB_NO_CAMELLIA}
{.$define SB_NO_SEED}
{.$define SB_NO_SRP}
{.$define SB_EXCL_XADES_INTF}

// this define controls language-specific problem with nested arrays of arrays
{$undef TriDES_KEY_AS_REC}

// include SSH Server shell handler
{$define SB_WINDOWS_SHELL}

{$ifdef NET_2_0_UP}
   {$define SB_HAS_X509CERTIFICATE2}
{$endif}

{$ifdef SB_EXCL_XADES}
  {$define SB_EXCL_XADES_INTF}
{$endif}

(****************************************

Platform-specific exclusions

****************************************)

// since there's no PGP in C++Builder 4 and 5, we exclude it's use from XML
{$ifdef B_4}
  {$define SB_EXCL_XML_PGP}
{$endif}
{$ifdef B_5}
  {$define SB_EXCL_XML_PGP}
  {.$define SBB_EXCL_XPATH}
  {.$define SBB_NO_PKCS11}
{$endif}
{$ifdef B_6}
  {$define SB_NO_PKCS11}
{$endif}


{$ifdef NET_CF}

  {$define SB_NO_PKCS11}
  {$define SB_NO_VS_TOOLBOX}
  {$define SB_NO_NET_REFLECTION}
  {$define SB_NO_NET_DESIGN}
  {$define SB_NO_NET_RWLOCK}
  {$define SB_NO_NET_MARSHALBYREF}
  {$define SB_NO_NET_WINDOWSFORMS}
  {$define SB_NO_NET_BROWSABLE}
  {$define SB_NO_NET_THREADRESUME}
  {$define SB_NO_NET_SERIALIZABLE}
  {$define SB_NO_NET_EXPOBJCONV}

  {.$undef SB_NTLM_SUPPORT}
  {$undef SB_PGPSFX}

  {$undef SB_WINDOWS_SHELL}
  {$undef SB_NET_DESKTOP}

  {$ifdef NET_CF_1_0}
    {$define TriDES_KEY_AS_REC}
    {$undef SB_IPv6}
    {$undef SB_DNSSEC}
  {$endif}
{$endif}

// Silverlight-specific defines
{$ifdef SILVERLIGHT}
  {$define SB_NO_PKCS11}
  {$define SB_NO_VS_TOOLBOX}
  {$define SB_NO_NET_REFLECTION}
  {$define SB_NO_NET_DESIGN}
  {$define SB_NO_NET_RWLOCK}
  {$define SB_NO_NET_MARSHALBYREF}
  {$define SB_NO_NET_WINDOWSFORMS}
  {$define SB_NO_NET_COMPONENT}
  {$define SB_NO_NET_THREADPRIORITY}
  {$define SB_NO_NET_ARRAYLIST}
  {$define SB_NO_NET_BROWSABLE}
  {$define SB_NO_NET_ASCII_ENCODING}
  {$define SB_NO_NET_INTEROP}
  {$define SB_NO_NET_THREADRESUME}
  {$define SB_NO_REGISTRY}
  {$define SB_NO_NET_SERIALIZABLE}
  {$define SB_NO_NET_EXPOBJCONV}

  {$define SB_SILVERLIGHT_SOCKETS}

  {$undef SB_HAS_GOST}
  {$undef SB_HAS_WINCRYPT}
  {$undef SB_PGPSFX}
  {$undef SB_GSSAPI}
  {$undef SB_NTLM_SUPPORT}
  {$undef SB_IPv6}
  {$undef SB_NET_DESKTOP}
  {$undef SB_DNSSEC}
  {$undef SB_WINDOWS_SHELL}

{$endif}


{$ifdef CLX_USED}
  {$define SB_NO_REGISTRY}

  {$undef SB_NTLM_SUPPORT}
  {$undef SB_HAS_WINCRYPT}
  {$undef SB_IPv6}
  {$undef SB_DNSSEC}
  {$undef SB_GSSAPI}
  {$undef SB_PGPSFX}

  {$undef SB_WINDOWS_SHELL}

{$endif}


{$ifdef MONO}
  {$undef SB_HAS_WINCRYPT}
  {$define SB_NO_PKCS11}
  {$undef SB_NTLM_SUPPORT}
  {$define TriDES_KEY_AS_REC}
  {$undef SB_PGPSFX}

  {$undef SB_WINDOWS_SHELL}
  {$undef SB_HAS_X509CERTIFICATE2}
{$endif}


{$ifdef FPC}
  {$ifndef WIN32}
    {$undef SB_HAS_WINCRYPT}
    {.$define SB_NO_PKCS11}
    {$undef SB_WINDOWS_SHELL}
  {$endif}
  {.$undef SB_NTLM_SUPPORT}
{$endif}


{$ifdef SB_ACTIVEX_MODE}
  {$define SB_NO_SRP}
  {$define SB_NO_ECTLS}
  {$define SB_GSSAPI}
{$endif}


{$ifdef SB_PGPSFX_STUB}
  {$define SB_NO_RC2}
  {$define SB_NO_RC4}
  {$define SB_NO_CAMELLIA}
  {$define SB_NO_SEED}
  {$define SB_NO_SRP}
  {$define SB_NO_RABBIT}
  {$define SB_NO_PKCS11}
  {$define SB_NO_SERPENT}
  {$define SB_NO_UMAC}
  {$define SB_NO_MD2}
  {$define SB_NO_COMPONENT}   // removes dependency on VCL TComponent class
  {$define SB_NO_COMPRESSION} // removes compression from ZLib (decompression left)
  {$undef SB_HAS_ECC}
  {$undef SB_HAS_GOST}
  {$undef SB_HAS_WINCRYPT}
  {$undef SB_PGPSFX}
  {$undef SB_GSSAPI}
{$endif}
#18969
Posted: 02/07/2012 23:52:04
by DWS DWS (Priority Standard support level)
Joined: 02/24/2011
Posts: 17

Thanks for the response. We're still getting our head around MAC and development. I will let you know if we can get this to work ...
#19410
Posted: 03/11/2012 22:13:38
by DWS DWS (Priority Standard support level)
Joined: 02/24/2011
Posts: 17

Good day,

I have taken over this task from my colleague and start to compile the BaseBBoxLinux.pp with FreePascal 2.6.0 in Mac OS X 10.7.3. Please note that I have removed some of the windows specific checks from SBUtils.pas, SBStreams.pas etc and got this for.

SBUtils.pas
{$ifdef SB_WINDOWS}
Windows,
{$else}

SBStreams.pas
{$ifdef WIN32}
Windows,
{$endif}

Are these identifiers specific to windows?
Do you suggest to remove these identifiers code?
The compilation errors are as below.

I appreciate your help.

Free Pascal Compiler version 2.6.0 [2011/12/30] for i386
Copyright © 1993-2011 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling BaseBBoxLinux.pp
Compiling . ./sources/SBLicenseManager.pas
Compiling . ./sources/SBUtils.pas
Compiling . ./sources/SBMath.pas
Compiling . ./sources/SBEncoding.pas
Compiling . ./sources/SBUtils.pas
Compiling . ./sources/SBConstants.pas
Assembling (pipe) . ./sources/SBConstants.s
Compiling . ./sources/SBRandom.pas
Assembling (pipe) . ./sources/SBRandom.s
Compiling . ./sources/SBMD.pas
Assembling (pipe) . ./sources/SBMD.s
Compiling . ./sources/SBASN1Tree.pas
Compiling . ./sources/SBStreams.pas
Writing Resource String Table file: SBStreams.rst
Assembling (pipe) . ./sources/SBStreams.s
Compiling . ./sources/SBASN1.pas
Writing Resource String Table file: SBASN1.rst
Assembling (pipe) . ./sources/SBASN1.s
Writing Resource String Table file: SBASN1Tree.rst
Assembling (pipe) . ./sources/SBASN1Tree.s
Compiling . ./sources/SBSHA.pas
Assembling (pipe) . ./sources/SBSHA.s
SBUtils.pas(1785,27) Error: Identifier not found "MultiByteToWideChar"
SBUtils.pas(1785,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(1788,29) Error: Identifier not found "MultiByteToWideChar"
SBUtils.pas(1788,36) Error: Identifier not found "CP_ACP"
SBUtils.pas(1791,27) Error: Identifier not found "WideCharToMultiByte"
SBUtils.pas(1795,27) Error: Identifier not found "WideCharToMultiByte"
SBUtils.pas(1811,27) Error: Identifier not found "MultiByteToWideChar"
SBUtils.pas(1814,29) Error: Identifier not found "MultiByteToWideChar"
SBUtils.pas(1817,27) Error: Identifier not found "WideCharToMultiByte"
SBUtils.pas(1817,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(1821,27) Error: Identifier not found "WideCharToMultiByte"
SBUtils.pas(1821,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(1838,27) Error: Identifier not found "MultiByteToWideChar"
SBUtils.pas(1838,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(1841,27) Error: Identifier not found "MultiByteToWideChar"
SBUtils.pas(1841,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(1865,27) Error: Identifier not found "WideCharToMultiByte"
SBUtils.pas(1865,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(1870,27) Error: Identifier not found "WideCharToMultiByte"
SBUtils.pas(1870,34) Error: Identifier not found "CP_ACP"
SBUtils.pas(4868,36) Error: Identifier not found "_TIME_ZONE_INFORMATION"
SBUtils.pas(4868,36) Error: Error in type definition
SBUtils.pas(4872,36) Error: Identifier not found "GetTimeZoneInformation"
SBUtils.pas(4873,38) Error: Identifier not found "TIME_ZONE_ID_INVALID"
SBUtils.pas(4876,24) Error: Illegal qualifier
SBUtils.pas(4876,40) Error: Illegal qualifier
SBUtils.pas(4878,24) Error: Illegal qualifier
SBUtils.pas(4878,40) Error: Illegal qualifier
SBUtils.pas(4880,24) Error: Illegal qualifier
SBUtils.pas(4922,45) Error: Identifier not found "FILETIME"
SBUtils.pas(4924,35) Error: Identifier not found "ULARGE_INTEGER"
SBUtils.pas(4927,53) Error: Identifier not found "FILETIME"
SBUtils.pas(4932,10) Error: Illegal qualifier
SBUtils.pas(4933,10) Error: Illegal qualifier
SBUtils.pas(4937,45) Error: Identifier not found "FILETIME"
SBUtils.pas(4942,30) Error: Identifier not found "FileTimeToSystemTime"
SBUtils.pas(4948,57) Error: Identifier not found "FILETIME"
SBUtils.pas(4954,10) Error: Illegal qualifier
SBUtils.pas(4955,10) Error: Illegal qualifier
SBUtils.pas(4956,23) Error: Identifier not found "SystemTimeToFileTime"
SBUtils.pas(5013,30) Error: Identifier not found "InitializeCriticalSection"
SBUtils.pas(5026,26) Error: Identifier not found "DeleteCriticalSection"
SBUtils.pas(6603,20) Error: Identifier not found "GetDriveType"
SBUtils.pas(6604,36) Error: Identifier not found "DRIVE_NO_ROOT_DIR"
SBUtils.pas(6604,61) Error: Identifier not found "DRIVE_UNKNOWN"
SBUtils.pas(6912,12) Error: Identifier not found "TMsg"
SBUtils.pas(6912,12) Error: Error in type definition
SBUtils.pas(6917,36) Error: Identifier not found "MsgWaitForMultipleObjects"
SBUtils.pas(6918,21) Error: Identifier not found "QS_SENDMESSAGE"
SBUtils.pas(6918,39) Error: Identifier not found "WAIT_OBJECT_0"
SBUtils.pas(6918,39) Fatal: There were 50 errors compiling module, stopping
Fatal: Compilation aborted
#19411
Posted: 03/11/2012 23:56:05
by Eugene Mayevski (EldoS Corp.)

Are you compiling the latest build of SecureBlackbox? It looks like there's something wrong with defines, as the errors point to Windows-specific declarations.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 8340 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!