[問題] OpenCV in WinForm 重複定義
開發平台(Platform):VS2012 ,OpenCV 2.4.5
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
我在windows form下使用openCV,但是當我在namespace Winform { }裡宣告
不管是cv::Mat * 、 cv::Mat 、 IplImage* 等等,在compile的時候
都會出現以下的錯誤。環境的設定應該都沒有問題。查了很久還是找不出解答。
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
1. error LNK2005: "class cv::Mat left_mat" (?left_mat@@3VMat@cv@@A) 已在
MyForm.obj 定義過了。
2. error LNK1169: 找到有一或多個已定義的符號
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
有include的class:
#include <cv.h>
#include <opencv2/highgui/highgui.hpp>
#include <msclr\marshal_cppstd.h>
#include <fstream>
#include <string.h>
#include <string>
剛開始使用openfCV的初學者,麻煩幫忙解答。:D
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.183.101
推
05/17 18:34, , 1F
05/17 18:34, 1F
→
05/17 20:28, , 2F
05/17 20:28, 2F
→
05/19 00:42, , 3F
05/19 00:42, 3F
→
05/19 00:43, , 4F
05/19 00:43, 4F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章