我可以帮助你翻译。需要翻译的内容与IT技术有关,涉及将C++代码包含OpenCV头文件转换为使用Emscripten转换为WebAssembly。当我尝试使用以下命令进行编译时:
em++ main.cpp -s WASM=1 -o seamCarve.html
我收到了以下错误信息:
#include <opencv2/imgproc/imgproc.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting
这是我第一次使用WebAssembler,我不太确定该怎么做。根据以下链接中的步骤,我已经编译了OpenCV库以创建一个opencv.js文件:https://docs.opencv.org/3.4/d4/da1/tutorial_js_setup.html。
我不确定是否需要在编译时包含这个js文件,或者是否需要在编译时包含每个头文件。