In this case: 1) because h2pas doesn't use pascal macro's. A construct like #if defined(WIN32) && !defined(PDFLIB_CALL) #define PDFLIB_CALL __cdecl #endif can not be translated using pascal constants or functions. Cdecl is a calling convention modifier. 2) afaik pascal doesnt support widestring constants. Therefor h2pas doesn't understand #define IFILTER_WCHAR_LONG_VERSIONSTRING L"4.0p7". In this case, the string doesn't contain non-ascii characters and pascal will assign (convert) correctly a ascii string to a widechar string. So you can just solve the problem by const IFILTER_WCHAR_LONG_VERSIONSTRING=IFILTER_LONG_VERSIONSTRING;
Ludo -----Message d'origine----- De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Marcos Douglas Envoyé : mercredi 18 mai 2011 16:24 À : FPC-Pascal users discussions Objet : [fpc-pascal] Re: PDFlib TET - convert using h2pas On Tue, May 17, 2011 at 5:04 PM, Marcos Douglas <m...@delfire.net> wrote: > > Hi, > I would like to use the TET[1] in FPC on Windows. > There are 2 options: > 1- Translate C header to use libtet.dll (I prefer); > 2- Use the COM object (TET_com.dll); > > I can use COM in Delphi 7 easily. There is a Wizard to translate call > from COM object to Object Pascal... But I would like to use FPC! > > Somebody can help me to use h2pas tool to translate the C header in > attachment? > > [1] http://www.pdflib.com/download/tet/ Anyone? At least tell me why h2pas can not parse this header file, please. Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal