PDA

View Full Version : Integratiing CMarkup XML Parser throws error in QT



ITion
16th March 2011, 06:32
Hi All,
I am newbie to QT. I have used an CMarkup Class from (www.firstobject.com) which is one of the finest xml parser that i have used over years .I am trying to use that file in QT environment but it throws me lot of error just after including it . I am also in touch with firstobject guys to solve this issue . Like to know if any one have faced such issues . The Support people mailed me saying


I think that means that QT is setting UNICODE based on setup
somewhere. That's not the problem, I was just grasping for more
background. I think the errors you gave me provide enough information,
I will get back to you as soon as I find some time to look into it
further.

Have also included the screen shot here

kerim
22nd March 2011, 17:03
hi,
did u found out how to make it compilable ?? i have the same problem here :(

kerim
23rd March 2011, 08:24
here is the answer to the problem from above i got from the firstobject.com website support, and its sad to see that others only know to post questions here but no answers if they got them already:


Thanks for writing.

I recently worked this out with a user (possibly with the user who posted at the website you linked). He succeeded in making it work, but did not respond with the precise measures he used. I can give you the same suggestions I gave him. Please respond with exactly how you get it to work!

In general the problem is that QT uses GNUC but has some differences on Windows from what I assume for GNUC.

First of all CMarkup is defaulting to MARKUP_ICONV which is not available on Windows, so set a precompiler definition to either MARKUP_WINCONV or MARKUP_STDCONV. I see some mention of adding something to your .pro file:

DEFINES+=MARKUP_STDCONV

The fseeko and ftello problem is solved by changing Markup.h:218 to

#if defined(__GNUC_ZNIX__)

so that it will actually define MCD_FSEEK as fseek etc.

For the swprintf problem, find the following in Markup.h:

#if defined(__GNUC__)
#define MCD_SSZ(sz) sz,(sizeof(sz)/sizeof(MCD_CHAR))

And change the __GNUC__ to __GNUC_ZNIX__ as follows:

#if defined(__GNUC_ZNIX__)
#define MCD_SSZ(sz) sz,(sizeof(sz)/sizeof(MCD_CHAR))


cheers

ITion
5th May 2012, 05:03
here is the answer to the problem from above i got from the firstobject.com website support, and its sad to see that others only know to post questions here but no answers if they got them already:


Thanks for writing.

I recently worked this out with a user (possibly with the user who posted at the website you linked). He succeeded in making it work, but did not respond with the precise measures he used. I can give you the same suggestions I gave him. Please respond with exactly how you get it to work!

In general the problem is that QT uses GNUC but has some differences on Windows from what I assume for GNUC.

First of all CMarkup is defaulting to MARKUP_ICONV which is not available on Windows, so set a precompiler definition to either MARKUP_WINCONV or MARKUP_STDCONV. I see some mention of adding something to your .pro file:

DEFINES+=MARKUP_STDCONV

The fseeko and ftello problem is solved by changing Markup.h:218 to

#if defined(__GNUC_ZNIX__)

so that it will actually define MCD_FSEEK as fseek etc.

For the swprintf problem, find the following in Markup.h:

#if defined(__GNUC__)
#define MCD_SSZ(sz) sz,(sizeof(sz)/sizeof(MCD_CHAR))

And change the __GNUC__ to __GNUC_ZNIX__ as follows:

#if defined(__GNUC_ZNIX__)
#define MCD_SSZ(sz) sz,(sizeof(sz)/sizeof(MCD_CHAR))


cheers


Sorry for the very late reply .Firstobject guys were very helpful in fixing this . I forgot to post the answer that I got from them here. But I updated it in the stackoverflow website same time.
http://stackoverflow.com/questions/5294123/qt-cmarkupxmlparser-error-iconv-h-no-such-file-or-director
d