{"id":1268,"date":"2022-08-30T15:15:07","date_gmt":"2022-08-30T15:15:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/10\/undefined-references-when-linking-assembly-and-c-using-g-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:15:07","modified_gmt":"2022-08-30T15:15:07","slug":"undefined-references-when-linking-assembly-and-c-using-g-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/undefined-references-when-linking-assembly-and-c-using-g-collection-of-common-programming-errors\/","title":{"rendered":"Undefined references when linking assembly and C++ using g++-Collection of common programming errors"},"content":{"rendered":"<p>I have to write some member functions of a class in Assembly for an exam. I&#8217;ve followed every instruction but I still can&#8217;t get it to work. Here are the relevant files. The header and the main method are already provided, I just need to write the constructor and the <code>elab1<\/code> method.<\/p>\n<p><strong>Class header<\/strong><\/p>\n<pre><code>#include \nusing namespace std;\nstruct st { int a; int vv1[4]; double vv2[4]; };\nclass cl \n{   double b; st s;\npublic:\n    cl(int *p, double *d);\n    void elab1(st ss);\n    void stampa()\n    {   int i; cout<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-10 00:13:09. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have to write some member functions of a class in Assembly for an exam. I&#8217;ve followed every instruction but I still can&#8217;t get it to work. Here are the relevant files. The header and the main method are already provided, I just need to write the constructor and the elab1 method. Class header #include [&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-1268","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1268","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=1268"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1268\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}