{"id":568,"date":"2022-08-30T15:03:31","date_gmt":"2022-08-30T15:03:31","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/undefined-symbols-for-architecture-x86_64-in-xcode-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:03:31","modified_gmt":"2022-08-30T15:03:31","slug":"undefined-symbols-for-architecture-x86_64-in-xcode-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/undefined-symbols-for-architecture-x86_64-in-xcode-collection-of-common-programming-errors\/","title":{"rendered":"Undefined symbols for architecture x86_64 in xcode-Collection of common programming errors"},"content":{"rendered":"<p>I get a Undefined symbols for architecture x86_64 error when compile it.<\/p>\n<p>I build a game tree and check which nodes of the tree is empty using <code>isEmpty()<\/code> function.<\/p>\n<p>Although there shows no errors,im not sure about the way i pass the two-dimensional array tree into the <code>isEmpty()<\/code> function.<\/p>\n<pre><code>#include \n#include \n#include \n#include \n\/\/#include \"header.h\"\n#define YES 10\n#define NO 20\n\nstruct Node\n{\n    Node ** children;\n    int     childCount;\n    char name[1];\n    int empty;\/\/YES or NO\n    int sequence;\n    double  value;\n};\n\nusing namespace std;\n\nbool isEmpty(Node, int);\n\nbool isEmpty(Node **ptr, int bsize) {    \n    for (int i = 0; iempty == YES){\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nint main (int argc, const char * argv[])\n{\n    int size  = 4;\n    Node tree[size][size];\n\/\/ some stuff\n    if (isEmpty(tree[size][size], size)) {\n        cout<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-09 20:53:45. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I get a Undefined symbols for architecture x86_64 error when compile it. I build a game tree and check which nodes of the tree is empty using isEmpty() function. Although there shows no errors,im not sure about the way i pass the two-dimensional array tree into the isEmpty() function. #include #include #include #include \/\/#include &#8220;header.h&#8221; [&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-568","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/568","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=568"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/568\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}