简体   繁体   中英

Use SWIG to wrap OpenCV's C++ API in GO

I'm trying to use SWIG to wrap OpenCV's C++ API. For now, I have system-wise OpenCV installed. My questions are:

  1. Is it possible to wrap "system-wise" library without putting them into the same directory of my SWIG files? For example, my opencv's header files are in /usr/local/opt/opencv/opencv2/opencv.hpp . Can I use %include "opencv2/opencv.hpp" in SWIG?

  2. How should I start with this work? Should I wrap the CONSTANTs first?

thanks.

You can %include any header file you like. It doesn't have to be in the same directory.

I would start by thinking about the API you want to present to Go programs. A good Go API is often different from a good C API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM