我一直在使用OpenCV4Android并生成了一个在我的Android应用程序中使用的库,我想在任何Windows软件中创建相同的库,现在使用 OpenCV4Windows 。
问题是由于找不到不同的头文件(由OpenCV调用),我无法编译代码这是特别奇怪的,因为我仍然可以为android编译相同的代码(使用OpenCV4Android)
已经尝试过不同版本的OpenCV4Windows并没有成功 以下一行:
g++ -c MMROI.cpp -ID:\software\OpenCV4Windows\opencv\build\include
给出了这个结果:
"*In file included from D:\software\OpenCV4Windows\opencv\build\include\opencv2/core/cvdef.h:59,
from D:\software\OpenCV4Windows\opencv\build\include\opencv2/core.hpp:52,
from D:\software\OpenCV4Windows\opencv\build\include\opencv2/opencv.hpp:46,
from MMROI.hpp:4,
from MMROI.cpp:5:
D:\software\OpenCV4Windows\opencv\build\include\opencv2/hal/defs.h:274: stdint.h: No such file or directory
In file included from D:\software\OpenCV4Windows\opencv\build\include\opencv2/core.hpp:3107,
from D:\software\OpenCV4Windows\opencv\build\include\opencv2/opencv.hpp:46,
from MMROI.hpp:4,
from MMROI.cpp:5:
D:\software\OpenCV4Windows\opencv\build\include\opencv2/core/cvstd.inl.hpp:49: ostream: No such file or directory*"
答案 0 :(得分:0)
我解决了这个问题,它是一个非常古老的g ++版本,它通过重新安装cygwin和更新g ++和gcc包来解决