Hello,

I managed to download the TRUNK from the svn. For all Windows users out
there it needs 2 steps:
1) Install Slik-Subversion from http://www.sliksvn.com/en/download
2) Open a dosprompt in type: svn co
https://podofo.svn.sourceforge.net/svnroot/podofo/podofo/trunk podofo
The second statement will create a podofo directory and download the latest
sources.


First I must compliment you, because most errors of my previous report are
fixed. Also the PdfCompilerCompat.h is a good solution.

I compiled again using Borland and now only 5 issues are left (actually 4,
because item 3 and 4 are the same issue).

1) Modified PdfCompilerCompat.h
It is attached to this message.
Summarizing the changes:
- The switch for detecting Borland is __BORLANDC__
- Extra includes for Borland:
#  include <math.h>
#  include <stdio.h>
#  include <time.h>
#  include <string.h>
- #  define PODOFO__FUNCTION__ __FUNC__
- #if HAVE_WINSOCK_H must be #if HAVE_WINSOCK2_H (type error)
- For WINSOCK2.H, after then #undef GetObject also #undef DrawText
(otherwise PdfPainter.cpp will not compile)

2) The PdfField.cpp needs an extra pair of ( ) around "bChecked ?
PdfName("Yes") : PdfName("Off")" in function SetChecked:
C:\a\open\PoDoFo\podofo\src\PdfField.cpp:
Warning W8066 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 113: Unreachable code
in function PdfField::Init(PdfAcroForm *)
Warning W8066 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 221: Unreachable code
in function PdfField::SetHighlightingMode(EPdfHighlightingMode)
Error E2357 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 630: Reference
initialized with 'PdfName', needs lvalue of type 'PdfName' in function
PdfCheckBox::SetChecked(bool)
Error E2342 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 630: Type mismatch in
parameter 'rhs' (wanted 'const PdfName &', got 'PdfName') in function
PdfCheckBox::SetChecked(bool)
Error E2357 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 631: Reference
initialized with 'PdfName', needs lvalue of type 'PdfName' in function
PdfCheckBox::SetChecked(bool)
Error E2342 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 631: Type mismatch in
parameter 'rhs' (wanted 'const PdfName &', got 'PdfName') in function
PdfCheckBox::SetChecked(bool)
Warning W8057 C:\a\open\PoDoFo\podofo\src\PdfField.cpp 632: Parameter
'bChecked' is never used in function PdfCheckBox::SetChecked(bool)

void PdfCheckBox::SetChecked( bool bChecked )
{
    m_pObject->GetDictionary().AddKey( PdfName("V"), (bChecked ?
PdfName("Yes") : PdfName("Off")) );
    m_pObject->GetDictionary().AddKey( PdfName("AS"), (bChecked ?
PdfName("Yes") : PdfName("Off")) );
}


3) Inclusion of the jpeglib.h in PdfFiltersPrivate.h: #define HAVE_BOOLEAN
is needed
C:\a\open\PoDoFo\podofo\src\PdfFilter.cpp:
Error E2238 C:\a\open\PoDoFo\jpeg\jmorecfg.h 234: Multiple declaration for
'boolean'
Error E2344 C:\Program Files (x86)\CodeGear\RAD Studio\5.0\\Include\rpcndr.h
162: Earlier declaration of 'boolean'
*** 2 errors in Compile ***

#ifdef PODOFO_HAVE_JPEG_LIB
extern "C" {
#ifdef _WIN32  // Collision between win and jpeg-headers
#define XMD_H
#define HAVE_BOOLEAN
#endif
#include "jpeglib.h"
}
#endif // PODOFO_HAVE_JPEG_LIB


4) Inclusion of the jpeglib.h in PdfImage.cpp: #define HAVE_BOOLEAN is
needed
C:\a\open\PoDoFo\podofo\src\PdfImage.cpp:
Error E2238 C:\a\open\PoDoFo\jpeg\jmorecfg.h 234: Multiple declaration for
'boolean'
Error E2344 C:\Program Files (x86)\CodeGear\RAD Studio\5.0\\Include\rpcndr.h
162: Earlier declaration of 'boolean'
Error E2268 C:\a\open\PoDoFo\podofo\src\PdfImage.cpp 178: Call to undefined
function 'strncasecmp' in function PdfImage::LoadFromFile(const char *)
Warning W8004 C:\a\open\PoDoFo\podofo\src\PdfImage.cpp 184: 'pszExtension'
is assigned a value that is never used in function
PdfImage::LoadFromFile(const char *)
Warning W8066 C:\a\open\PoDoFo\podofo\src\PdfImage.cpp 509: Unreachable code
in function PdfImage::ColorspaceToName(EPdfColorSpace)

#ifdef PODOFO_HAVE_JPEG_LIB
extern "C" {
#  ifndef XMD_H
#    define XMD_H
#    define HAVE_BOOLEAN
#  endif
#  include "jpeglib.h"
}
#endif // PODOFO_HAVE_JPEG_LIB

5) There is a type error in PdfImage.cpp (line 179), "strncasecmp" should be
"PoDoFo::compat::strncasecmp"
C:\a\open\PoDoFo\podofo\src\PdfImage.cpp:
Error E2268 C:\a\open\PoDoFo\podofo\src\PdfImage.cpp 179: Call to undefined
function 'strncasecmp' in function PdfImage::LoadFromFile(const char *)
Warning W8004 C:\a\open\PoDoFo\podofo\src\PdfImage.cpp 185: 'pszExtension'
is assigned a value that is never used in function
PdfImage::LoadFromFile(const char *)
Warning W8066 C:\a\open\PoDoFo\podofo\src\PdfImage.cpp 510: Unreachable code
in function PdfImage::ColorspaceToName(EPdfColorSpace)

#ifdef PODOFO_HAVE_JPEG_LIB
        if( PoDoFo::compat::strncasecmp( pszExtension, "jpg", 3 ) == 0 )
        {
            LoadFromJpeg( pszFilename );
            return;
        }
#endif

Attachment: PdfCompilerCompat.h
Description: Binary data

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to