Hi,

Update, I found out where the JPEG errors came from.
In source PdfImage.c before including jpeglib.h insert the following lines:
#ifdef PODOFO_HAVE_JPEG_LIB
//INSERTED
#define XMD_H
#define HAVE_BOOLEAN
//END INSERTED
extern "C" {
#include "jpeglib.h"
}
#endif // PODOFO_HAVE_JPEG_LIB


Compiling then fails in PdfInputDevice.cpp:
[ 39%] Building CXX object
src/CMakeFiles/podofo_shared.dir/PdfInputDevice.cpp.obj
C:\a\open\PoDoFo\podofo\src\PdfInputDevice.cpp: In constructor
`PoDoFo::PdfInputDevice::PdfInputDevice(const wchar_t*)':
C:\a\open\PoDoFo\podofo\src\PdfInputDevice.cpp:72: error: no matching
function for call to `std::basic_ifstream<char, std::char_traits<char>
>::basic_ifstream(const wchar_t*&, const std::_Ios_Openmode&)'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iosfwd:90:
note: candidates are: std::basic_ifstream<char, std::char_traits<char>
>::basic_ifstream(const std::basic_ifstream<char, std::char_traits<char> >&)
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/fstream:524:
note:                 std::basic_ifstream<_CharT,
_Traits>::basic_ifstream(const char*, std::_Ios_Openmode) [with _CharT =
char, _Traits = std::char_traits<char>]
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/fstream:509:
note:                 std::basic_ifstream<_CharT, _Traits>::basic_ifstream()
[with _CharT = char, _Traits = std::char_traits<char>]
mingw32-make[2]: ***
[src/CMakeFiles/podofo_shared.dir/PdfInputDevice.cpp.obj] Error 1
mingw32-make[1]: *** [src/CMakeFiles/podofo_shared.dir/all] Error 2
mingw32-make: *** [all] Error 2



Investigating PdfInputDevice.cpp I modified PdfIputDevice:
#ifdef _WIN32
#if defined(_MSC_VER)  &&  _MSC_VER <= 1200   // nicht für Visualstudio 6
#else
PdfInputDevice::PdfInputDevice( const wchar_t* pszFilename )
{
 PdfError e( ePdfError_FileNotFound, __FILE__, __LINE__ );
 e.SetErrorInformation( pszFilename );
 throw e;
/*
    this->Init();
    if( !pszFilename )
    {
        PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
    }
    try {
        m_pStream = new std::ifstream( pszFilename, std::ios::binary );
        if( !m_pStream || !m_pStream->good() )
        {
     PdfError e( ePdfError_FileNotFound, __FILE__, __LINE__ );
     e.SetErrorInformation( pszFilename );
     throw e;
        }
        m_StreamOwned = true;
    }
    catch(...) {
        // should probably check the exact error, but for now it's a good
error
 PdfError e( ePdfError_FileNotFound, __FILE__, __LINE__ );
 e.SetErrorInformation( pszFilename );
 throw e;
    }
    PdfLocaleImbue(*m_pStream);
*/
}
#endif
#endif // _WIN32


AND NOW IT BUILDS 100% FINE USING MinGW !

Regards,
Mirco
------------------------------------------------------------------------------
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