
[英]expected constructor, destructor, or type conversion before ‘*’ token
[英]expected constructor, destructor, or type conversion before ‘(’ token with __declspec(dllexport)
我已经浏览过关于同一错误的几篇文章,并且似乎在编译器找不到与签名匹配的构造函数时会发生这种情况?
但是我不能排除这种可能性,因为我的情况大不相同-它具有__declspec(dllexport)
并且我不确定这是否是导致问题的元凶。
这是错误消息:
yuqiong@yuqiong-G7-7588:/media/yuqiong/DATA/Vignetting_corrector/C++/Vig_Correction/build$ make
Scanning dependencies of target correction
[ 50%] Building CXX object CMakeFiles/correction.dir/Vig_Correction.cpp.o
In file included from /media/yuqiong/DATA/Vignetting_corrector/C++/Vig_Correction/Vig_Correction.cpp:5:0:
/media/yuqiong/DATA/Vignetting_corrector/C++/Vig_Correction/ColorCorrection.hpp:16:10: error: expected constructor, destructor, or type conversion before ‘(’ token
_declspec(dllexport) int VignettingCorrectionUsingRG(unsigned char* pImage, int ht, int wd,
^
/media/yuqiong/DATA/Vignetting_corrector/C++/Vig_Correction/Vig_Correction.cpp: In function ‘int VignettingCorrect(IplImage*)’:
/media/yuqiong/DATA/Vignetting_corrector/C++/Vig_Correction/Vig_Correction.cpp:47:65: error: ‘VignettingCorrectionUsingRG’ was not declared in this scope
int flag=VignettingCorrectionUsingRG(pImageBuffer, sht, swd, vp);
^
CMakeFiles/correction.dir/build.make:62: recipe for target 'CMakeFiles/correction.dir/Vig_Correction.cpp.o' failed
make[2]: *** [CMakeFiles/correction.dir/Vig_Correction.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/correction.dir/all' failed
make[1]: *** [CMakeFiles/correction.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
这是我的ColorCorrection.hpp
文件...
#ifndef COLOR_CORRECTION_HPP
#define COLOR_CORRECTION_HPP
#include <vector>
using namespace std;
__declspec(dllexport) int VignettingCorrectionUsingRG(unsigned char* pImage, int ht, int wd, vector<double>& vp);
#endif
非常感谢您的提前帮助...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.