<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[undefined reference to duckx::Document::Document]]></title><description><![CDATA[<p dir="auto">I'm trying to add a library to a project. <a href="https://github.com/AlexanderVatov/DuckX" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/AlexanderVatov/DuckX</a>. Using qmake.<br />
I encountered the following errors when executing the test code proposed by the author of the library:</p>
<p dir="auto"><img src="https://i.stack.imgur.com/kSKBI.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">.pro file looks like this:</p>
<p dir="auto"><img src="https://i.stack.imgur.com/6NP6N.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">To solve the problem, I tried to rebuild the project.</p>
]]></description><link>https://forum.qt.io/topic/134976/undefined-reference-to-duckx-document-document</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 21:11:07 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/134976.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Mar 2022 09:33:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 12:46:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toruha">@<bdi>Toruha</bdi></a> You can't mix different compilers like in this case Microsoft compiler and MinGW. You have to build both, the library and your app, with same compiler.</p>
<p dir="auto">But from your screen-shot above it rather looks like you're using Microsoft compiler...</p>
]]></description><link>https://forum.qt.io/post/706065</link><guid isPermaLink="true">https://forum.qt.io/post/706065</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 11 Mar 2022 12:46:46 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Sat, 12 Mar 2022 14:32:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kkoehne">@<bdi>kkoehne</bdi></a> Thanks. Everything works after changing the build type</p>
]]></description><link>https://forum.qt.io/post/706151</link><guid isPermaLink="true">https://forum.qt.io/post/706151</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Sat, 12 Mar 2022 14:32:59 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Sat, 12 Mar 2022 14:21:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Thanks, this solves the original problem</p>
]]></description><link>https://forum.qt.io/post/706150</link><guid isPermaLink="true">https://forum.qt.io/post/706150</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Sat, 12 Mar 2022 14:21:42 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Sat, 12 Mar 2022 13:28:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> I tried to rebuild under Microsoft compiler. What caused these new errors</p>
]]></description><link>https://forum.qt.io/post/706147</link><guid isPermaLink="true">https://forum.qt.io/post/706147</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Sat, 12 Mar 2022 13:28:24 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 13:11:32 GMT]]></title><description><![CDATA[<p dir="auto">Right, the _ITERATOR_DEBUG_LEVEL, RuntimeLibrary issues above rather show that you've done a Release build of duckx, but want to use it in a debug build of your app. This won't work; you need to compile both in the same configuration.</p>
]]></description><link>https://forum.qt.io/post/706070</link><guid isPermaLink="true">https://forum.qt.io/post/706070</guid><dc:creator><![CDATA[kkoehne]]></dc:creator><pubDate>Fri, 11 Mar 2022 13:11:32 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 12:46:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toruha">@<bdi>Toruha</bdi></a> You can't mix different compilers like in this case Microsoft compiler and MinGW. You have to build both, the library and your app, with same compiler.</p>
<p dir="auto">But from your screen-shot above it rather looks like you're using Microsoft compiler...</p>
]]></description><link>https://forum.qt.io/post/706065</link><guid isPermaLink="true">https://forum.qt.io/post/706065</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 11 Mar 2022 12:46:46 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 12:44:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> MinGW</p>
]]></description><link>https://forum.qt.io/post/706064</link><guid isPermaLink="true">https://forum.qt.io/post/706064</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Fri, 11 Mar 2022 12:44:47 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 12:34:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toruha">@<bdi>Toruha</bdi></a> said in <a href="/post/706046">undefined reference to duckx::Document::Document</a>:</p>
<blockquote>
<p dir="auto">c++11 console</p>
</blockquote>
<p dir="auto">This doesn't tell me much, really!<br />
Did you use the Microsoft compiler (same as in Visual Studio)? Or did you use MinGW?</p>
]]></description><link>https://forum.qt.io/post/706059</link><guid isPermaLink="true">https://forum.qt.io/post/706059</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 11 Mar 2022 12:34:04 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 12:33:39 GMT]]></title><description><![CDATA[<p dir="auto">I got a new error trying to return everything back<br />
<img src="https://ddgobkiprc33d.cloudfront.net/44f2359d-190d-450b-a74f-89bb52c326df.png" alt="5575e08c-05a1-4c3a-8fc1-dab30f61ae2a-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/706058</link><guid isPermaLink="true">https://forum.qt.io/post/706058</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Fri, 11 Mar 2022 12:33:39 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 12:06:43 GMT]]></title><description><![CDATA[<p dir="auto">After a short look at the <a href="https://github.com/AlexanderVatov/DuckX/blob/master/src/duckx.hpp" target="_blank" rel="noopener noreferrer nofollow ugc">duckx.hpp</a> header file you will see that it lacks the proper import/export macros as described e.g. <a href="https://doc.qt.io/qt-5/sharedlibrary.html" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. So you can either only build and link the library as static lib or add the correct macros.</p>
]]></description><link>https://forum.qt.io/post/706053</link><guid isPermaLink="true">https://forum.qt.io/post/706053</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Fri, 11 Mar 2022 12:06:43 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 11:48:27 GMT]]></title><description><![CDATA[<p dir="auto">As suggested already by <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> , please <em>don't</em> list duckx headers in HEADERS variable.</p>
<p dir="auto">Can you paste the actual compiler output (Use Build&gt;Rebuild, and paste the output of 'Comiple Output' pane?)</p>
]]></description><link>https://forum.qt.io/post/706051</link><guid isPermaLink="true">https://forum.qt.io/post/706051</guid><dc:creator><![CDATA[kkoehne]]></dc:creator><pubDate>Fri, 11 Mar 2022 11:48:27 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Sat, 12 Mar 2022 13:26:25 GMT]]></title><description><![CDATA[<p dir="auto">Text .pro:</p>
<p dir="auto">QT -= gui</p>
<p dir="auto">CONFIG += c++11 console<br />
CONFIG -= app_bundle</p>
<p dir="auto">SOURCES += <br />
main.cpp</p>
<p dir="auto">qnx: target.path = /tmp/$${TARGET}/bin<br />
else: unix:!android: target.path = /opt/$${TARGET}/bin<br />
!isEmpty(target.path): INSTALLS += target</p>
<p dir="auto">win32:CONFIG(release, debug|release): LIBS += -L$$PWD/duckx/lib/ -lduckx<br />
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/duckx/lib/ -lduckxd<br />
else:unix: LIBS += -L$$PWD/duckx/lib/ -lduckx</p>
<p dir="auto">INCLUDEPATH += $$PWD/duckx/include/duckx<br />
DEPENDPATH += $$PWD/duckx/include/duckx</p>
<p dir="auto">INCLUDEPATH += $$PWD/duckx/include/duckx<br />
HEADERS += <br />
constants.hpp <br />
duckx.hpp <br />
duckxiterator.hpp <br />
pugiconfig.hpp <br />
pugixml.hpp <br />
zip.h</p>
]]></description><link>https://forum.qt.io/post/706050</link><guid isPermaLink="true">https://forum.qt.io/post/706050</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Sat, 12 Mar 2022 13:26:25 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 11:32:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toruha">@<bdi>Toruha</bdi></a> I hope this is what you were asking.</p>
]]></description><link>https://forum.qt.io/post/706047</link><guid isPermaLink="true">https://forum.qt.io/post/706047</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Fri, 11 Mar 2022 11:32:53 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 11:20:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> c++11 console</p>
]]></description><link>https://forum.qt.io/post/706046</link><guid isPermaLink="true">https://forum.qt.io/post/706046</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Fri, 11 Mar 2022 11:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 11:08:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toruha">@<bdi>Toruha</bdi></a> What compiler do you use for your Qt application?</p>
]]></description><link>https://forum.qt.io/post/706045</link><guid isPermaLink="true">https://forum.qt.io/post/706045</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 11 Mar 2022 11:08:32 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 10:58:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> I built the library via Cmake and compiled it in Visual Studio 2019. Then I added the library as "External library" referring to <a href="https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html</a>.</p>
]]></description><link>https://forum.qt.io/post/706043</link><guid isPermaLink="true">https://forum.qt.io/post/706043</guid><dc:creator><![CDATA[Toruha]]></dc:creator><pubDate>Fri, 11 Mar 2022 10:58:07 GMT</pubDate></item><item><title><![CDATA[Reply to undefined reference to duckx::Document::Document on Fri, 11 Mar 2022 10:21:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toruha">@<bdi>Toruha</bdi></a> Please post text as text, not screen shots.<br />
Why do you add the headers from that library directly? It is enough to set INCLUDEPATH as ayou're already doing.<br />
Did you build the library already?</p>
]]></description><link>https://forum.qt.io/post/706041</link><guid isPermaLink="true">https://forum.qt.io/post/706041</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 11 Mar 2022 10:21:25 GMT</pubDate></item></channel></rss>