简体   繁体   English

如何在codelite中配置项目的首选项?

[英]How do I configure the preferences of a project in codelite?

I have codelite 5.2, windows 10, C language, how can I configure the preferences of a project so that it finds the libraries (.h) of another project (of the library, static library) in the same workspace?我有 codelite 5.2、windows 10、C 语言,如何配置项目的首选项,以便它在同一工作区中找到另一个项目(库、静态库)的库 (.h)?

I have tried to put various paths but I always get: mylibrary.h: no such file or directory Please, I appreciate any help我试图放置各种路径,但我总是得到:mylibrary.h:没有这样的文件或目录请,我感谢任何帮助

Some comments: Your CodeLite version is wrong, I think that it is 14.0.4 (CodeLite Makefile Generator was added in this release)一些评论:你的CodeLite版本不对,我认为是14.0.4 (这个版本增加了CodeLite Makefile Generator)

In order to tell the compiler (not CodeLite) where to search for header filee:为了告诉编译器(不是 CodeLite)在哪里搜索头文件:

  • In the project settings dialog (the one in the picture) select the Compiler tab from the tree view on the right在项目设置对话框(图中的那个)中,从右侧的树视图中选择Compiler选项卡
  • Select the Include paths and there the location where the header files ( *.h ) can be found选择Include paths然后可以找到头文件 ( *.h ) 的位置

Note that adding the header files is usually not enough, because you will also need to link against these libraries.请注意,添加头文件通常是不够的,因为您还需要链接这些库。 To do this:去做这个:

  • In the project settings dialog, select the Linker tab在项目设置对话框中,选择Linker选项卡
  • In the linker page, update the location of the library files ( .a or .dll ) in the Libraries search path and you will also need to pass the library name in the Libraries field在链接器页面中,更新库文件( .a.dll )在Libraries search path ,您还需要在Libraries字段中传递库名称

HTH, Eran HTH, 伊兰

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

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