
#Coderunner 2 take control debug mac os
Here, I want to clarify the unclear bit in SSteve's reply so everyone knows how and where to modify the command line before compiling their code with external library in Mac OS system. The previous reply by SSteve is great and also helps me sort out linking Boost library in CodeRunner.īecause the solution in the previous reply is specific to OpenCV library, a carelessly adding to the clang++ command line for external libraries in general might just generate massive building errors, which was the case when I tried to link Boost library. You can set up a template for OpenCV programs. Modify the -l parameters to include the libraries you typically use.Īfter saving the compile script, go back to Preferences -> Languages and select the Templates button. On other machines I've compiled from source so OpenCV is installed in /usr/local/lib. On this machine I used Homebrew to install OpenCV so it was installed in /usr/local/opt. Here's my version: xcrun clang++ -x c++ -lc++ -o "$out" -I/usr/local/opt/opencv3/include -L/usr/local/opt/opencv3/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -lopencv_videoio -lopencv_calib3d the -I and - L parameters to match your OpenCV install path.

Look for this line (or something similar): xcrun clang++ -x c++ -lc++ -o "$out" the clang++ command line parameters for OpenCV after "$out". On the right side of the preferences window, click Settings then the Edit Script button. Go to Preferences -> Languages, right-click C++, and select Duplicate. You can run OpenCV in CodeRunner by setting up a new language.
