简体   繁体   English

在Ubuntu 16.04 LTS中将CodeLite IDE用于OpenCV

[英]Using CodeLite IDE for OpenCV in Ubuntu 16.04 LTS

I can compile a sample C++ Code (including OpenCV) using both CMake and following command line: 我可以使用CMake和以下命令行编译示例C ++代码(包括OpenCV):

g++ cv.cpp -o cvapp pkg-config --cflags --libs opencv g ++ cv.cpp -o cvapp pkg-config --cflags --libs opencv

But I want to use CodeLite IDE for this purpose. 但是我想为此使用CodeLite IDE I have added 我已经添加了

/usr/include/opencv;/usr/include/opencv2 的/ usr /包括/ OpenCV的;在/ usr /包括/ opencv2

in the Include Paths under compiler tab in project settings. 在项目设置的 编译器下的包含路径 ”选项卡中。 And added 并添加

/usr/local/lib 在/ usr / local / lib目录

in Libraries Search Path under Linker tab. 链接器选项卡下的库搜索路径中

But still, I am getting errors shown in this screenshot for a sample code. 但是,仍然在此屏幕快照中显示了示例代码的错误。 Now is it possible to use CodeLite for OpenCV coding environment? 现在可以将CodeLite用于OpenCV编码环境了吗? If yes then how? 如果是,那怎么办?

To use opencv in codelite the simplest option is to continue using pkg-config, you can do this as follows: 要在Codelite中使用opencv,最简单的选择是继续使用pkg-config,您可以按照以下步骤进行操作:

  1. Right click on the project name and select settings... 右键单击项目名称,然后选择settings...

在此处输入图片说明

2.Open the following dialog and select the Linker tab, in that window add pkg-config --cflags --libs opencv in linker-options: 2.打开以下对话框并选择“链接器”选项卡,在该窗口中的链接器选项中添加pkg-config --cflags --libs opencv

在此处输入图片说明

Press the apply button and Ok and then compile the project. 按应用按钮,然后单击确定,然后编译该项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM