{"id":167,"date":"2012-10-09T20:46:03","date_gmt":"2012-10-09T20:46:03","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=167"},"modified":"2016-04-12T15:27:37","modified_gmt":"2016-04-12T15:27:37","slug":"running-your-exe","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/running-your-exe","title":{"rendered":"Running Your Exe"},"content":{"rendered":"<h4>\nRunning your exe from the command prompt<br \/>\n<\/h4>\n<p>\nIf you are in the same directory:\n<\/p>\n<pre>\r\n<code>.\/myexefile    \/\/The &#39;.&#39; says &#39;in this directory&#39;\r\n<\/code><\/pre>\n<p>\nIf you are in another directory:\n<\/p>\n<pre>\r\n<code>\/home\/pi\/projects\/myexefile<\/code><\/pre>\n<p>\nIf you need root permissions (e.g. your application uses IO control) then add sudo in front of the command to elevate the command permissions to the root user level:\n<\/p>\n<pre>\r\n<code>sudo .\/myexefile<\/code><\/pre>\n<p>\nTo forcibly stop the program use CTRL+Break\n<\/p>\n<h5>\n&#39;Segmentation Fault&#39; Error<br \/>\n<\/h5>\n<p>\nDid you forget to use sudo&nbsp;to elevate the permissions?\n<\/p>\n<h4>\nRunning your exe from the GUI LXTerminal<br \/>\n<\/h4>\n<p>\nAs above, but to forcibly stop the program use CTRL+SHIFT+C\n<\/p>\n<h4>\nAuto running your exe<br \/>\n<\/h4>\n<p>\nSee <a href=\"https:\/\/raspberry-projects.com\/pi\/pi-operating-systems\/raspbian\/auto-running-programs\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running your exe from the command prompt If you are in the same directory: .\/myexefile \/\/The &#39;.&#39; says &#39;in this directory&#39; If you are in another directory: \/home\/pi\/projects\/myexefile If you need root permissions (e.g. your application uses IO control) then add sudo in front of the command to elevate the command permissions to the root [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,9],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-compilers-and-ides","category-programming-in-c"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":13,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":2541,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/167\/revisions\/2541"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}