neslib / Chet

C Header Translator for Delphi
BSD 2-Clause "Simplified" License
207 stars 44 forks source link

Error converting XMLSec library #36

Open HealthOneNZ opened 7 months ago

HealthOneNZ commented 7 months ago

I'm using your excellent tool to convert the XMLSec library for Win64 use.

I have downloaded the source from https://www.zlatkovic.com/pub/libxml/64bit/zlib-1.2.8-win32-x86_64.7z, unpacked it and am using Chet to process the libxml2 directory.

I get an error

Parsing header files...
C:\Temp\xmlsec\libxml2\include\libxml2\libxml\c14n.h:20:10: fatal error: 'libxml/xmlversion.h' file not found
Parsed header files with 1 error(s)

It looks to be choking on the c14n.h file where line 20 has an include directive #include <libxml/xmlversion.h>

I'm not sure why it has the path, as this IS the path of the file currently being processed. How can the path be ignored ?

jarroddavis68 commented 7 months ago

set path to the root of libxml include folder. For example: c:\temp\libxml\include, so when a reference to <libxml/xmlversion.h> is made it can find it correctly.

HealthOneNZ commented 7 months ago

Thanks, I added C:\Temp\xmlsec\libxml2\include\libxml2\ which is the parent directory of the libxml directory

I know get an error for one of the C standard library files

Parsing header files...
C:\Temp\xmlsec\libxml2\include\libxml2\libxml\tree.h:15:10: fatal error: 'stdio.h' file not found
Parsed header files with 1 error(s)

Can I tell it to exclude these types of files

HealthOneNZ commented 7 months ago

OK, I've just checked the "Ignore parse errors" option so it has skipped over this. Fingers crossed I can get this to work :)

jarroddavis68 commented 7 months ago

Thanks, I added C:\Temp\xmlsec\libxml2\include\libxml2\ which is the parent directory of the libxml directory

I know get an error for one of the C standard library files

Parsing header files...
C:\Temp\xmlsec\libxml2\include\libxml2\libxml\tree.h:15:10: fatal error: 'stdio.h' file not found
Parsed header files with 1 error(s)

Can I tell it to exclude these types of files

This is most likely because you do not have a C compiler installed. I have VS2022, can be clang/gcc etc. It will skip all the standard headers like this. You can just have the vs build tools is enough.