Skip to content

Instantly share code, notes, and snippets.

@jamesandersen
Last active June 30, 2017 23:06
Show Gist options
  • Save jamesandersen/f38bf31dd1f97844807fc85e3edaccce to your computer and use it in GitHub Desktop.
Save jamesandersen/f38bf31dd1f97844807fc85e3edaccce to your computer and use it in GitHub Desktop.
Cross-platform CGO Preamble
/*
#cgo darwin CPPFLAGS: -I/usr/local/Cellar/opencv3/3.2.0/include -I/usr/local/Cellar/opencv3/3.2.0/include/opencv2
#cgo darwin CXXFLAGS: --std=c++1z -stdlib=libc++
#cgo darwin LDFLAGS: -L/usr/local/Cellar/opencv3/3.2.0/lib -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo
#cgo linux CPPFLAGS: -I/usr/include -I/usr/include/opencv2 -I/usr/local/include -I/usr/local/include/opencv2
#cgo linux CXXFLAGS: --std=c++1z
#cgo linux LDFLAGS: -L/usr/lib -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo
#include <stdlib.h>
#include "sudoku_parser.h"
*/
import "C"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment