{"id":24,"date":"2009-02-07T17:28:26","date_gmt":"2009-02-07T16:28:26","guid":{"rendered":"http:\/\/localhost\/~johan\/wordpress\/?p=24"},"modified":"2014-07-21T13:54:01","modified_gmt":"2014-07-21T11:54:01","slug":"qcad-2-0-5-on-intel-mac-os-x","status":"publish","type":"post","link":"https:\/\/www.chaosgeordend.nl\/wordpress\/2009\/02\/07\/qcad-2-0-5-on-intel-mac-os-x\/","title":{"rendered":"QCad 2.0.5 on Intel Mac OS X"},"content":{"rendered":"<div id=\"entry_img\"><a href=\"https:\/\/www.chaosgeordend.nl\/mt-blog-cg\/images\/QCad.png\" rel=\"lightbox[24]\"><img decoding=\"async\" src=\"https:\/\/www.chaosgeordend.nl\/mt-blog-cg\/images\/thumbnails\/QCad.png\" alt=\"QCad.png\" \/><\/a><\/div>\n<p>Looking for a program to view and edit .dxf files on the Mac I stumbled upon <a href=\"https:\/\/www.qcad.org\/qcad.html\">QCad<\/a> from Ribbonsoft. This allows you to view and edit <a href=\"https:\/\/en.wikipedia.org\/wiki\/AutoCAD_DXF\">Autocad DXF<\/a> files.<\/p>\n<p><!--more--><\/p>\n<h2>Compiling QCad<\/h2>\n<p>Although the QCad source is under GPL, only demo versions are availabale as binary. So, compiled QCad from source. Follows the list and some links I used to get QCad compiled under <strong>OS X 10.4.11<\/strong> with gcc-4.0 (and using a MacPorts QT3 installation, present from previous MacPort installed sw)<\/p>\n<pre lang=\"shell\">\r\n### install the QT3 package with MacPorts.\r\n### You are expected to be familiar with MacPorts\r\n### and have it installed\r\n$ ssh -l yourAdminUser localhost\r\n## this is used to logon as admin from within an\r\n## ordinary user terminal session\r\n$ sudo port selfupdate\r\n$ sudo port install qt3\r\n...\r\n### compile QCad\r\n$ cd \/opt\/local\r\n$ sudo mkdir qcad\r\n$ sudo cp \/Users\/yourUserId\/Desktop\/QCad\/qcad-2.0.5.0-1-community.src.tar.gz .\r\n$ tar xfz qcad-2.0.5.0-1-community.src.tar.gz\r\n$ rm qcad-2.0.5.0-1-community.src.tar.gz\r\n### to prevent \"qmacstyle_mac.h: No such file or directory\" error,\r\n### applied patch manually (as patch raised errors) by commenting\r\n### out (with vi) in src\/main.cpp:\r\n\/\/#ifdef __APPLE__\r\n\/\/#include\r\n\/\/#endif:\r\n...\r\n\/\/#ifdef __APPLE__\r\n\/\/ QApplication::setStyle(new QMacStyle());\r\n\/\/#endif\r\n...\r\n$ export QTDIR=\/opt\/local\/lib\/qt3 ## MacPorts QT3 location\r\n$ export QMAKESPEC=\/opt\/local\/lib\/qt3\/mkspecs\/macx-g++\r\n$ cd scripts\r\n$ .\/build_qcad.sh notrans\r\n<\/pre>\n<p>Running QCad<\/p>\n<p>Doubleclik QCad.app or start from terminal window:<\/p>\n<pre lang=\"shell\">$ open \/opt\/local\/qcad\/qcad-2.0.5.0-1-community.src\/qcad\/QCad.app<\/pre>\n<p>Compile QCad under <strong>OS X 10.5.8<\/strong><\/p>\n<pre lang=\"shell\">\r\n$ cd \/opt\/local\/qcad\/qcad-2.0.5.0-1-community.src\/scripts\/\r\n$ sudo vi build_qcad.sh # set Qt vars in build script (setting environment vars didn't work for me)\r\nexport QTDIR=\/opt\/local\/lib\/qt3\r\nexport QMAKESPEC=\"\/opt\/local\/lib\/qt3\/mkspecs\/macx-g++\"\r\nexport PATH=$QTDIR\/bin:$PATH\r\n$ sudo vi ..\/qcadlib\/src\/engine\/rs_entity.cpp # edit or apply this <a href=\"https:\/\/bugs.debian.org\/cgi-bin\/bugreport.cgi?bug=288190\">Debian patch<\/a>\r\n- os &lt;&lt; \" layer address: \" &lt;&lt; (int)(e.layer) &lt;&lt; \" \";\r\n+ os &lt;&lt; \" layer address: \" &lt;&lt; (long)(e.layer) &lt;&lt; \" \";\r\n$ sudo vi ..\/qcadlib\/src\/engine\/rs_layer.cpp # same\r\n- &lt;&lt; \" address: \" &lt;&lt; (int)(&amp;l)\r\n+ &lt;&lt; \" address: \" &lt;&lt; (long)(&amp;l)\r\n$ sudo vi ..\/qcad\/src\/qc_applicationwindow.cpp # fix Help info (Qt assistant is in \/opt\/local\/bin\/qt3 which is part of the $PATH set)\r\n- assistant = new QAssistantClient(RS_SYSTEM-&gt;getAppDir()+\"\/bin\", this);\r\n+ assistant = new QAssistantClient(\"\", this);\r\n$ sudo rm ..\/dxflib\/src\/*.o; # clean .app and all object files\r\n$ sudo rm ..\/fparser\/src\/*.o;\r\n$ sudo rm ..\/qcad\/src\/obj\/*.o;\r\n$ sudo rm ..\/qcadactions\/src\/obj\/*.o;\r\n$ sudo rm ..\/qcadcmd\/src\/obj\/*.o;\r\n$ sudo rm ..\/qcadguiqt\/src\/obj\/*.o;\r\n$ sudo rm ..\/qcadlib\/src\/obj\/*.o;\r\n$ sudo rm -R ..\/qcad\/QCad.app;\r\n$ sudo .\/build_qcad.sh notrans # build QCad<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Looking for a program to view and edit .dxf files on the Mac I stumbled upon QCad from Ribbonsoft. This allows you to view and edit Autocad DXF files.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,6,26],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-2d","category-oss","category-qcad"],"_links":{"self":[{"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":4,"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":132,"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/posts\/24\/revisions\/132"}],"wp:attachment":[{"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chaosgeordend.nl\/wordpress\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}