lalesculiviu
9th March 2018, 12:00
Dear Qt Centre community,
I am the author of free software named FET (https://lalescu.ro/liviu/fet/download.html).
It compiles well under gcc or MinGW with the latest Qt 5.10.1, on Windows, GNU/Linux or Mac OS X (I think under Max OS X the users compile it with clang).
Unfortunately, it does not compile on MSVC (Microsoft Visual Studio).
There is a file, fet-v.v.v/src/interface/helpaboutform_template.ui, which is very large, contains one very large string in Unicode UTF-8, in a QTextBrowser.
MSVC gives this error:
.\tmp\gui\ui_helpaboutform_template.h:884: Fehler: C1091: Compilerlimit : Die Zeichenfolge Âberschreitet die L„nge um 65535 Bytes
That means: Compiler limit reached because of too many characters.
The string is written in .\tmp\gui\ui_helpaboutform_template.h beginning as:
thanksToTextBrowser->setHtml(QApplication::translate("HelpAboutForm_template", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:9pt;\">(chronologically):</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:9pt;\">Costin Badica - he advised Liviu Lalescu to begin this project and offered many suggestions.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0p"
"x; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:9pt;\">Carsten Niehaus - suggestions.</span></p>\n"
I could solve this by writing the text into more C++ strings, but the characters are UTF-8 (Unicode) and I don't want to add special characters into the C++ sources.
How could I solve this problem?
I am the author of free software named FET (https://lalescu.ro/liviu/fet/download.html).
It compiles well under gcc or MinGW with the latest Qt 5.10.1, on Windows, GNU/Linux or Mac OS X (I think under Max OS X the users compile it with clang).
Unfortunately, it does not compile on MSVC (Microsoft Visual Studio).
There is a file, fet-v.v.v/src/interface/helpaboutform_template.ui, which is very large, contains one very large string in Unicode UTF-8, in a QTextBrowser.
MSVC gives this error:
.\tmp\gui\ui_helpaboutform_template.h:884: Fehler: C1091: Compilerlimit : Die Zeichenfolge Âberschreitet die L„nge um 65535 Bytes
That means: Compiler limit reached because of too many characters.
The string is written in .\tmp\gui\ui_helpaboutform_template.h beginning as:
thanksToTextBrowser->setHtml(QApplication::translate("HelpAboutForm_template", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:9pt;\">(chronologically):</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:9pt;\">Costin Badica - he advised Liviu Lalescu to begin this project and offered many suggestions.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0p"
"x; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:9pt;\">Carsten Niehaus - suggestions.</span></p>\n"
I could solve this by writing the text into more C++ strings, but the characters are UTF-8 (Unicode) and I don't want to add special characters into the C++ sources.
How could I solve this problem?