{"id":1043,"date":"2011-07-12T09:50:07","date_gmt":"2011-07-12T14:50:07","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=1043"},"modified":"2011-07-12T09:50:07","modified_gmt":"2011-07-12T14:50:07","slug":"c-tips-and-tricks-for-macos-x","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=1043","title":{"rendered":"C++ tips and tricks for MacOS X"},"content":{"rendered":"<p><a href=\"https:\/\/jaimerios.com\/wp-content\/uploads\/2011\/07\/xcode4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jaimerios.com\/wp-content\/uploads\/2011\/07\/xcode4.png\" alt=\"Xcode 4\" title=\"xcode4\" width=\"145\" height=\"126\" class=\"alignleft size-full wp-image-1038\" \/><\/a><\/p>\n<p>\nI had to do some fancy debugging of a C++ dylib and while I was searching around the internet, I came accross this article from Apple:  <a href=\"http:\/\/developer.apple.com\/library\/mac\/#technotes\/tn2185\/_index.html\" target=\"_blank\" rel=\"noopener\">C++ features in MacOS X<\/a>.<\/p>\n<p>I also found two cool articles that describe well how the dlopen application works and what happens to your symbols when an application bundle loads your dylibs:<\/p>\n<p><a href=\"http:\/\/www.codeproject.com\/KB\/recipes\/dynamic_linking-in-mach-o.aspx\" target=\"_blank\" rel=\"noopener\">Dynamic Linking of Imported Functions in Mach-O<\/a><\/p>\n<p><a href=\"http:\/\/www.codeproject.com\/KB\/recipes\/redirection-in-mach-o.aspx?display=Mobile\" target=\"_blank\" rel=\"noopener\">Redirection of Imported Functions in Mach-O<\/a><\/p>\n<p>I also found a cool programs that shows you what the load might look like in a particular dylib. This is a very useful tool:<\/p>\n<p><a href=\"http:\/\/sourceforge.net\/projects\/machoview\/\" target=\"_blank\" rel=\"noopener\">MachOView<\/a><\/p>\n<p><strong>Related posts<\/strong><br \/>\n<a href=\"http:\/\/www.jaimerios.com\/?p=888\" target=\"_blank\" rel=\"noopener\">MacDependency<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to do some fancy debugging of a C++ dylib and while I was searching around the internet, I came accross this article from Apple: C++ features in MacOS X. I also found two cool articles that describe well how the dlopen application works and what happens to your symbols when an application bundle &#8230; <a title=\"C++ tips and tricks for MacOS X\" class=\"read-more\" href=\"https:\/\/jaimerios.com\/?p=1043\" aria-label=\"Read more about C++ tips and tricks for MacOS X\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[100,163,169,180,339,506],"class_list":["post-1043","post","type-post","status-publish","format-standard","hentry","category-coding","tag-c","tag-dependency","tag-dlopen","tag-dylib","tag-otool","tag-xcode"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/1043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1043"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/1043\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}