{"id":1672,"date":"2022-08-30T15:18:29","date_gmt":"2022-08-30T15:18:29","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/undefined-reference-to-when-including-file-from-separate-directory-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:29","modified_gmt":"2022-08-30T15:18:29","slug":"undefined-reference-to-when-including-file-from-separate-directory-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/undefined-reference-to-when-including-file-from-separate-directory-collection-of-common-programming-errors\/","title":{"rendered":"Undefined reference to when including file from separate directory-Collection of common programming errors"},"content":{"rendered":"<p>I have very basic QT application (just create to explain my problem). So here I go \ud83d\ude42 I have two folders, f1 and f2, and they are on same level (have same folder for parent). In f1 I have source code from my project, and in f2 another project. For sake of this example, let&#8217;s say that in f1 I have only common.h and common.cpp, and in f2 I have:<\/p>\n<p>Test.pro<\/p>\n<pre><code>SOURCES = main.cpp\nINCLUDEPATH += \"..\/\/f1\/\/\"\n<\/code><\/pre>\n<p>main.cpp<\/p>\n<pre><code>#include \n#include \n\nint main(int argc, char *argv[])\n{\n\n    qDebug()<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-27 12:26:46. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have very basic QT application (just create to explain my problem). So here I go \ud83d\ude42 I have two folders, f1 and f2, and they are on same level (have same folder for parent). In f1 I have source code from my project, and in f2 another project. For sake of this example, let&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1672","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1672"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1672\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}