compile colord [docbok2man does not process "-//OASIS//DTD DocBook V4.1//EN"] xml catalog files - libxml2

GEN colormgr.1
GEN cd-create-profile.1
GEN cd-fix-profile.1
cd-fix-profile.sgml:1: cd-create-profile.sgml:1: colormgr.sgml:1: parser parser error : parser error : error : StartTag: invalid element name
StartTag: invalid element name
StartTag: invalid element name
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
^
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
^
cd-create-profile.sgml:1: cd-fix-profile.sgml:1: parser error : Extra content at the end of the document
^
parser colormgr.sgml:1: parser error : Extra content at the end of the document
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
^
error : <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
^
Extra content at the end of the document
unable to parse colormgr.sgml
unable to parse cd-fix-profile.sgml
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
^
unable to parse cd-create-profile.sgml
Unable to recognise encoding of this document at /usr/share/perl5/vendor_perl/XML/SAX/PurePerl/EncodingDetect.pm line 100.
Document requires an element [Ln: 1, Col: 0]
Makefile:634: recipe for target 'cd-fix-profile.1' failed
make[2]: *** [cd-fix-profile.1] Error 255
make[2]: *** Waiting for unfinished jobs....
I am trying to compile colord, but having a hard time grasping how docbook and xml catalog files are working. Which is where I suspect the problem is, that I don't have an XML_CATALOG_FILES for Docbook SGML v4.1. Not sure how to create a catalog that should point to these schema defintions [http://www.docbook.org/sgml/4.1/].

Related

OMNeT++ make error in macOS (Catalina 10.15.5) for installation

I tried to compile source for OMNeT++ 5.6.2 in my computer (macOS Catalina 10.15.5).
But make some error during "make" command.
I don't know why occurs this error. I think the error is probably from "Qtenv" or "QT".
I also deleted "Command Line Tools" and reinstalled it, but the error still occurs.
Also I saw OMNeT++ installation guidebook that very simple step. This book description installation method by execute command "./configure" and "make" or "make -j4".
How to fix below error?
kimminwoo#Macbook-Pro-2020-13-inch-for-Minwoo omnetpp-5.6.2 % make
/Library/Developer/CommandLineTools/usr/bin/make -s MODE=release
***** Configuration: MODE=release, TOOLCHAIN_NAME=clang, LIB_SUFFIX=.dylib ****
===== Checking environment =====
===== Compiling utils ====
===== Compiling common ====
===== Compiling layout ====
===== Compiling eventlog ====
===== Compiling scave ====
===== Compiling nedxml ====
===== Compiling sim ====
===== Compiling envir ====
===== Compiling cmdenv ====
===== Compiling qtenv ====
animationcontrollerdialog.cc
In file included from animationcontrollerdialog.cc:20:
In file included from ./qtenv.h:33:
In file included from ./inspector.h:22:
In file included from ./qtutil.h:25:
In file included from /Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/QTimer:1:
/Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/qtimer.h:106:50: error: no template named 'is_same' in namespace 'QtPrivate'; did you mean
'std::is_same'?
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
^~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:883:61: note: 'std::is_same' declared here
template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
In file included from animationcontrollerdialog.cc:20:
In file included from ./qtenv.h:33:
In file included from ./inspector.h:22:
In file included from ./qtutil.h:25:
In file included from /Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/QTimer:1:
/Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/qtimer.h:113:50: error: no template named 'is_same' in namespace 'QtPrivate'; did you mean
'std::is_same'?
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
^~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:883:61: note: 'std::is_same' declared here
template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
In file included from animationcontrollerdialog.cc:20:
In file included from ./qtenv.h:33:
In file included from ./inspector.h:22:
In file included from ./qtutil.h:25:
In file included from /Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/QTimer:1:
/Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/qtimer.h:121:50: error: no template named 'is_same' in namespace 'QtPrivate'; did you mean
'std::is_same'?
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
^~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:883:61: note: 'std::is_same' declared here
template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
In file included from animationcontrollerdialog.cc:20:
In file included from ./qtenv.h:33:
In file included from ./inspector.h:22:
In file included from ./qtutil.h:25:
In file included from /Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/QTimer:1:
/Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtCore/qtimer.h:128:50: error: no template named 'is_same' in namespace 'QtPrivate'; did you mean
'std::is_same'?
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
^~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:883:61: note: 'std::is_same' declared here
template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
In file included from animationcontrollerdialog.cc:20:
In file included from ./qtenv.h:33:
In file included from ./inspector.h:25:
In file included from /Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtWidgets/QMenu:1:
/Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtWidgets/qmenu.h:91:43: error: no template named 'is_same' in namespace 'QtPrivate'; did you mean
'std::is_same'?
inline typename QtPrivate::QEnableIf<!QtPrivate::is_same<const char*, Func1>::value
^~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:883:61: note: 'std::is_same' declared here
template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
In file included from animationcontrollerdialog.cc:20:
In file included from ./qtenv.h:33:
In file included from ./inspector.h:25:
In file included from /Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtWidgets/QMenu:1:
/Users/kimminwoo/Desktop/omnetpp-5.6.2/tools/macosx/include/QtWidgets/qmenu.h:119:43: error: no template named 'is_same' in namespace 'QtPrivate'; did you mean
'std::is_same'?
inline typename QtPrivate::QEnableIf<!QtPrivate::is_same<const char*, Func1>::value
^~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:883:61: note: 'std::is_same' declared here
template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
^
6 errors generated.
make[2]: *** [/Users/kimminwoo/Desktop/omnetpp-5.6.2/out/clang-release/src/qtenv/animationcontrollerdialog.o] Error 1
make[1]: *** [qtenv] Error 2
make: *** [allmodes] Error 2
I got some solution here this problem!
I had to big mistake because I did install "qt" from "homebrew" package manager.
So I did uninstall "qt" package by using "homebrew" and above problem was solved.
Hope it helps those who have the same problem as me!
Instead of completely uninstalling qt, you can just unlink it:
brew unlink qt

How we can add xpath information in schematron error message output

I am using schematron API in MarkLogic to validate the XML document. Below is the snippet of code for reference.
xquery version "1.0-ml";
import module namespace sch = "http://marklogic.com/validate" at
"/MarkLogic/appservices/utils/validate.xqy";
import module namespace transform = "http://marklogic.com/transform" at "/MarkLogic/appservices/utils/transform.xqy";
declare namespace xsl = "http://www.w3.org/1999/XSL/not-Transform";
declare namespace iso = "http://purl.oclc.org/dsdl/schematron";
let $document :=
document{
<book xmlns="http://docbook.org/ns/docbook">
<title>Some Title</title>
<chapter>
<para>...</para>
</chapter>
</book>
}
let $schema :=
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:db="http://docbook.org/ns/docbook">
<s:ns prefix="db" uri="http://docbook.org/ns/docbook"/>
<s:pattern name="Glossary 'firstterm' type constraint">
<s:rule context="db:chapter">
<s:assert test="db:title">Chapter should contain title</s:assert>
</s:rule>
</s:pattern>
</s:schema>
return
sch:schematron($document, $schema)
Can anyone help me out to get the XPath information of the context node along with schematron error message output.
Here is code for what I think you are asking for.
If you want the xpath of an item you can use xdmp:path. in order to get the xpath of the whole document you'll just have to walk the tree, which is what the recursive function local:getXpathDeep is doing. You can change the formatting of the output from the string-join that I used, it just made it easier to read for me. I created an XML output to put both the schematron results and the XPath into but you can just return a sequence if you like or put it into a map.
xquery version "1.0-ml";
import module namespace sch = "http://marklogic.com/validate" at
"/MarkLogic/appservices/utils/validate.xqy";
import module namespace transform = "http://marklogic.com/transform" at "/MarkLogic/appservices/utils/transform.xqy";
declare namespace xsl = "http://www.w3.org/1999/XSL/not-Transform";
declare namespace iso = "http://purl.oclc.org/dsdl/schematron";
declare function local:getXpathDeep($node){
(
xdmp:path($node),
if (fn:exists($node/*)) then (
local:getXpathDeep($node/*)
) else ()
)
};
let $document :=
document{
<book xmlns="http://docbook.org/ns/docbook">
<title>Some Title</title>
<chapter>
<para>...</para>
</chapter>
</book>
}
let $schema :=
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:db="http://docbook.org/ns/docbook">
<s:ns prefix="db" uri="http://docbook.org/ns/docbook"/>
<s:pattern name="Glossary 'firstterm' type constraint">
<s:rule context="db:chapter">
<s:assert test="db:title">Chapter should contain title</s:assert>
</s:rule>
</s:pattern>
</s:schema>
return
<result>
<contextNodeXpath>{fn:string-join(local:getXpathDeep($document), "
" )}</contextNodeXpath>
<schematronOutPut>{sch:schematron($document, $schema)}</schematronOutPut>
</result>
That particular Schematron module is rather limited and does not provide a way to return the XPath for the context node from a report or failed assert.
The standard Schematron SVRL output does include the XPath for the items that fire failed asserts or reports.
Norm Walsh has published the ML-Schematron module that wraps the compilation of a Schematron schema into an XSLT using the Schematron stylesheets, and subsequent execution of the compiled XSLT to generate the SVRL report.
You could adjust your module to use it instead (after installing it and the standard Schematron XSLT files in your Modules database):
xquery version "1.0-ml";
declare namespace svrl="http://purl.oclc.org/dsdl/svrl";
import module namespace sch="http://marklogic.com/schematron" at "/schematron.xqy";
let $document :=
document{
<book xmlns="http://docbook.org/ns/docbook">
<title>Some Title</title>
<chapter>
<para>...</para>
</chapter>
</book>
}
let $schema :=
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:db="http://docbook.org/ns/docbook">
<s:ns prefix="db" uri="http://docbook.org/ns/docbook"/>
<s:pattern name="Glossary 'firstterm' type constraint">
<s:rule context="db:chapter">
<s:assert test="db:title">Chapter should contain title</s:assert>
</s:rule>
</s:pattern>
</s:schema>
return
sch:validate-document($document, $schema)
It produces the following SVRL report, which includes the XPath in the location attribute /*[local-name()='book']/*[local-name()='chapter']:
<svrl:schematron-output title="" schemaVersion="" xmlns:schold="http://www.ascc.net/xml/schematron"
xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:db="http://docbook.org/ns/docbook" xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
xmlns:svrl="http://purl.oclc.org/dsdl/svrl">
<!---->
<svrl:ns-prefix-in-attribute-values uri="http://docbook.org/ns/docbook" prefix="db"/>
<svrl:active-pattern document=""/>
<svrl:fired-rule context="db:chapter"/>
<svrl:failed-assert test="db:title" location="/*[local-name()='book']/*[local-name()='chapter']">
<svrl:text>Chapter should contain title</svrl:text>
</svrl:failed-assert>
</svrl:schematron-output>

Compiling Qt 5.3.0 for static linking under windows

I am trying to compile Qt for static linking following this tutorial: http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW
But i receive tons of warnings and a few errors.
For example this one:
C:/Developement/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lqjp2
collect2.exe: error: ld returned 1 exit status
Makefile.Release:79: recipe for target '..\..\bin\dumpdoc.exe' failed
mingw32-make[4]: *** [..\..\bin\dumpdoc.exe] Error 1
mingw32-make[4]: Target 'first' not remade because of errors.
mingw32-make[4]: Leaving directory 'C:/Developement/Qt/Static/src/qt-everywhere-opensource-src-5.3.0/qtactiveqt/tools/dumpdoc'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Target 'first' not remade because of errors.
for this, i set the environement variable to my path:
Name: LIBRARY_PATH
Value: C:\Developement\Qt\5.3\mingw482_32\bin
... but dunno yet if its gonna workin'
Beside this, i put the following paths to the PATH environement variable:
C:\Developement\Qt\5.3\mingw482_32\bin;
C:\Developement\Qt\Tools\mingw482_32\bin;
I am receiving tons of these kind of warning:
In file included from
C:\Developement\Qt\Static\src\qt-everywhere-opensource-src-5.3.0\qtbase\src\3rdparty\libjpeg/jpeglib.h:25:0,
from ......\3rdparty\jasper\src\libjasper\jpg\jpg_jpeglib.h:74,
from ......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:75:
C:\Developement\Qt\Static\src\qt-everywhere-opensource-src-5.3.0\qtbase\src\3rdparty\libjpeg/jconfig.h:55:0:
warning: "HAVE_STDDEF_H" redefined [enabled by default] #define
HAVE_STDDEF_H ^ In file included from
......\3rdparty\jasper\src\libjasper\include/jasper/jas_tvp.h:75:0,
from ......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:70:
......\3rdparty\jasper\src\libjasper\include/jasper/jas_config.h:65:0:
note: this is the location of the previous definition #define
HAVE_STDDEF_H 1 ^ In file included from
C:\Developement\Qt\Static\src\qt-everywhere-opensource-src-5.3.0\qtbase\src\3rdparty\libjpeg/jpeglib.h:25:0,
from ......\3rdparty\jasper\src\libjasper\jpg\jpg_jpeglib.h:74,
from ......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:75:
C:\Developement\Qt\Static\src\qt-everywhere-opensource-src-5.3.0\qtbase\src\3rdparty\libjpeg/jconfig.h:59:0:
warning: "HAVE_STDLIB_H" redefined [enabled by default] #define
HAVE_STDLIB_H ^
In file included from ......\3rdparty\jasper\src\libjasper\include/jasper/jas_tvp.h:75:0,
from ......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:70:
......\3rdparty\jasper\src\libjasper\include/jasper/jas_config.h:71:0:
note: this is the location of the previous definition
#define HAVE_STDLIB_H 1
^
......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c: In function 'jpg_decode':
......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:134:49: warning: parameter 'optstr' set but not used
[-Wunused-but-set-parameter]
jas_image_t *jpg_decode(jas_stream_t *in, char *optstr)
^
......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c: In function 'jpg_start_output':
......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:298:47: warning: parameter 'cinfo' set but not used
[-Wunused-but-set-parameter]
static void jpg_start_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo)
^
......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c: In function 'jpg_finish_output':
......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:335:48: warning: parameter 'cinfo' set but not used
[-Wunused-but-set-parameter]
static void jpg_finish_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo)
^ ......\3rdparty\jasper\src\libjasper\jpg\jpg_dec.c:335:67: warning:
parameter 'dinfo' set but not used [-Wunused-but-set-parameter]
static void jpg_finish_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo)
^
Wasn't i prepared enough to compile Qt?
What do i need to do in order to be able to compile Qt without getting errors everytime thrown out?
How long would it take until its compiled.

Errors in generated MOC files for QT5 from cmake

I generated moc files for QT5 using
set (CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
Then I add the moc files into SRC using
SET(SRC
src/main.cpp
src/video_widget_surface.cpp
src/video_widget.cpp
src/video_player.cpp
#moc files
moc/moc_video_player.cpp
moc/moc_video_widget.cpp
moc/moc_video_widget_surface.cpp
Finally I add the executable using
add_executable(somegui ${SRC})
But I get errors in moc files saying :
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:54:6: error: 'VideoWidget' has not been declared
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:62:19: error: 'VideoWidget' has not been declared
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:68:20: error: 'VideoWidget' has not been declared
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:68:46: error: non-member function 'const QMetaObject* metaObject()' cannot have cv-qualifier
/other/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobject.h: In function 'const QMetaObject* metaObject()':
/other/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobject.h:401:33: error: 'QScopedPointer<QObjectData> QObject::d_ptr' is protected
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:70:21: error: within this context
/other/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobject.h:401:33: error: invalid use of non-static data member 'QObject::d_ptr'
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:70:21: error: from this location
/other/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobject.h:401:33: error: 'QScopedPointer<QObjectData> QObject::d_ptr' is protected
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:70:50: error: within this context
/other/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobject.h:401:33: error: invalid use of non-static data member 'QObject::d_ptr'
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:70:50: error: from this location
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp: At global scope:
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:73:7: error: 'VideoWidget' has not been declared
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp: In function 'void* qt_metacast(const char*)':
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:47: error: expected type-specifier before 'VideoWidget'
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:47: error: expected '>' before 'VideoWidget'
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:47: error: expected '(' before 'VideoWidget'
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:47: error: 'VideoWidget' was not declared in this scope
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:59: error: expected primary-expression before '>' token
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:61: error: invalid use of 'this' in non-member function
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:77:67: error: expected ')' before ';' token
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:78:40: error: cannot call member function 'virtual void* QWidget::qt_metacast(const char*)' without object
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp: At global scope:
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:81:5: error: 'VideoWidget' has not been declared
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp: In function 'int qt_metacall(QMetaObject::Call, int, void**)':
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:83:43: error: cannot call member function 'virtual int QWidget::qt_metacall(QMetaObject::Call, int, void**)' without object
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp: In function 'void* qt_metacast(const char*)':
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:79:1: warning: control reaches end of non-void function [-Wreturn-type]
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp: In function 'const QMetaObject* metaObject()':
/other/workspace/perception/somestuff/moc/moc_video_widget.cpp:71:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [CMakeFiles/somestuff.dir/moc/moc_video_widget.cpp.o] Error 1
make[1]: *** [CMakeFiles/somestuff.dir/all] Error 2
make: *** [all] Error 2
My understanding is that there is some error in the moc files that are created. But I don't have any control over how that is created. Now how do I solve this bug ?
CMake documentation is not that bad, do not neglect reading it. You misunderstood the concept of AUTOMOC:
AUTOMOC is a boolean specifying whether CMake will handle the Qt moc preprocessor automatically, i.e. without having to use the QT4_WRAP_CPP() macro. Currently Qt4 is supported. When this property is set to TRUE, CMake will scan the source files at build time and invoke moc accordingly. If an #include statement like #include "moc_foo.cpp" is found, the Q_OBJECT class declaration is expected in the header, and moc is run on the header file. If an #include statement like #include "foo.moc" is found, then a Q_OBJECT is expected in the current source file and moc is run on the file itself. Additionally, all header files are parsed for Q_OBJECT macros, and if found, moc is also executed on those files.
So, first of all, you should not add generated moc files explicitly to sources and push them into executable compilation. In other words, you only push your sources:
SET(SRC
src/main.cpp
src/video_widget_surface.cpp
src/video_widget.cpp
src/video_player.cpp)
and moc ones are handled automatically by CMake.
Secondly, as stated in the documentation:
If Q_OBJECT is in the foo.h (i.e. QObject is declared in the header file),
then in the corresponding foo.cpp
don't forget to add #include "moc_foo.cpp", preferably at the end
of the file;
If Q_OBJECT is in the foo.cpp (i.e. QObject is declared in the source file),
then, again, in the foo.cpp itself
don't forget to add #include "foo.moc", preferably at the end
of the file.

Getting 'Dart_NewString': identifier not found on building dart-sqlite

Here is dart-sqlite: https://github.com/sam-mccall/dart-sqlite
trying to build it because I need 32bit version. Also is it possible to get it in 32bit?
I set path to dart-sdk, set path to sqlite sources and trying to build:
D:\Contrib\dart-sqlite>build
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
dart_sqlite.cc
src\dart_sqlite.cc(42) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(43) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(44) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(97) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(121) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(123) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(124) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(195) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(229) : error C3861: 'Dart_NewString': identifier not found
src\dart_sqlite.cc(266) : error C3861: 'Dart_IsString8': identifier not found
Generating Code...
Compiling...
sqlite3.c
Generating Code...
Must I switch compiler..? or is there something I miss?
Most uses of Dart_NewString in our code have been replaced by a utility function NewString:
// Create a new Dart String object from a C String.
static Dart_Handle NewString(const char* str) {
ASSERT(str != NULL);
return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str),
strlen(str));
}
You could include this utility function in dart_sqlite, or just use Dart_NewStringFromUTF8 directly.
There may be additional problems, because the Dart executable now includes the sqlite library, as part of NSS (Network Security Services, from Mozilla), which is used to implement secure sockets in dart:io.
Just a quick look at the latest sdk header file Dart_NewString does not exist anymore. The following signatures are available, so you might need to update sam's code.
16:53:48-adam#Adams-MacBook-Air:~/dart_bleeding/dart/runtime/include
$ grep -r Dart_NewString *
dart_api.h:DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char* str);
dart_api.h:DART_EXPORT Dart_Handle Dart_NewStringFromUTF8(const uint8_t* utf8_array,
dart_api.h:DART_EXPORT Dart_Handle Dart_NewStringFromUTF16(const uint16_t* utf16_array,
dart_api.h:DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const uint32_t* utf32_array,

Resources