Author Topic: Clang on Mac OS X  (Read 6414 times)

SEMacUsr2012

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Clang on Mac OS X
« on: September 26, 2012, 07:46:49 PM »
I am running Mac OS X 10.8. The default compiler is now clang, which I prefer over gcc. It is faster and gives much better error messages. I am able to compile and build several of my projects using clang, terminal and Makefiles. I tried configuring Slickedit  for Mac 2012 but found it to challenging. I created new compiler and linker settings, but those did not see to propagate throughout the rest of Slickedit. It did not work when I imported my Makefiles. It looks to me like just to get Slickedit to work with the standard compiler there is probably a lot of effort configuring Slickedit settings and testing those settings. Has anyone already solved this? Will Slickedit for Mac be updated to have settings pre-configured for clang?

Dennis

  • Senior Community Member
  • Posts: 3992
  • Hero Points: 520
Re: Clang on Mac OS X
« Reply #1 on: September 27, 2012, 04:53:04 PM »
Do you want to continue to use your Makefiles to build, or are you trying to configure things to use SlickEdit's build system?

If you simply want to configure a project to build using your makefiles, I would start with the C/C++ project wizard and select to build using a user written makefile.  You may have to point it to the location of your makefile.  This should get you started with the minimal amount of effort.

If you want to use SlickEdit's integrated build system, then again, I'd recommend starting with a generic C/C++ project, then configure the compile and link comands to use clang instead of cc.

SEMacUsr2012

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Clang on Mac OS X
« Reply #2 on: October 11, 2012, 04:17:30 PM »
Thanks for your reply. To answer your question, I try to avoid using Makefiles as I move my code C++ between Windows and Mac and the dependency tree for my projects is complex. I like the automatic dependency detection of Slick Edit, XCode and Visual Studio. I was able to setup clang for one project and save the settings, but the settings did not get re-used when I started a new project. I have 10+ projects, so it is a lot of work to reset it up. I was evaluating Slick Edit for Mac and doing this part-time, I just ran out of time in the two weeks.

Dennis

  • Senior Community Member
  • Posts: 3992
  • Hero Points: 520
Re: Clang on Mac OS X
« Reply #3 on: October 15, 2012, 12:57:59 PM »
You should doing the following:
1) Project > New...
2) Customize...
3) Click New...
4) Select the Project template you have been customizing for Clang
5) Customize it for Clang as you have done before

Then you will be able to use your new custom project for your new projects with a minimal amount of setup.

SEMacUsr2012

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Clang on Mac OS X
« Reply #4 on: October 31, 2012, 07:54:27 PM »
I still found this to be much more work than it needed to be. The debugger did not run correctly and when I enabled C++11, the syntax highlighting and linking did not work, despite explicitly setting the linker flags. In comparison, both NetBeans and XCode support the standard clang compiler. So, I will use NetBeans until SlickEdit properly supports clang and C++11.