Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>I do not know what I'm doing wrong? When I comment out #include "gui/mainwindow.h" then everything is OK.</p> </blockquote> <p>I think the problem is in your include directive. Try changing it to</p> <pre><code>#include "../gui/mainwindow.h" </code></pre> <blockquote> <p>When the preprocessor finds an <code>#include</code> directive it replaces it by the entire content of the specified file. There are two ways to specify a file to be included:</p> <p><code>#include "file"</code> <code>#include &lt;file&gt;</code> </p> <p>The only difference between both expressions is the places (directories) where the compiler is going to look for the file. In the first case where the file name is specified between double-quotes, the file is searched first in the same directory that includes the file containing the directive. In case that it is not there, the compiler searches the file in the default directories where it is configured to look for the standard header files. If the file name is enclosed between angle-brackets &lt;> the file is searched directly where the compiler is configured to look for the standard header files. Therefore, standard header files are usually included in angle-brackets, while other specific header files are included using quotes.</p> </blockquote> <p><a href="http://msdn.microsoft.com/en-us/library/36k2cdd4%28VS.80%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/36k2cdd4%28VS.80%29.aspx</a></p> <p>Edited:</p> <p>Now for the undefined reference error. You need to change your build.pro file.</p> <p>Change:</p> <pre><code>LIBS += -L../gui </code></pre> <p>to something like </p> <pre><code>LIBS += -L../gui/debug -lgui </code></pre> <p>(the path ../gui/debug works for me because that is the place where the lib "gui" is located)</p> <p>The idea is that you have to separate the directory where the library is located from the library name (without the extension and without any 'lib' prefix).</p> <p>See this question here: <a href="https://stackoverflow.com/questions/718447/adding-external-library-into-qt-creator-project">Adding external library into Qt Creator project</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload