Created
May 8, 2013 16:52
-
-
Save orisano/5541825 to your computer and use it in GitHub Desktop.
OpenCVのリンクを楽にするためのヘッダファイル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ↓の2つを定義したら使えるようになる | |
#define OPENCV_LIB_DIR "C:/opencv/lib" | |
#define OPENCV_VERSION "245" | |
#ifdef _DEBUG | |
#define __TAIL "d" | |
#else | |
#define __TAIL "" | |
#endif | |
#define __LIB_FILE(NAME) OPENCV_LIB_DIR "/opencv_" #NAME OPENCV_VERSION __TAIL ".lib" | |
#ifdef _MSC_VER | |
#define __PRAGMA(X) __pragma(X) | |
#else | |
#define __PRAGMA(X) _Pragma(X) | |
#endif | |
#define CV_LINK(LNAME) __PRAGMA(comment(lib, __LIB_FILE(LNAME))) | |
// こんな感じで書けるようになる | |
// CV_LINK(core) | |
// CV_LINK(highgui) | |
// CV_LINK(imgproc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment