在使用螺纹钢的发行版中包含头文件(例如wx.hrl)的最佳方式是什么 [英] What is the best way to include a header file (wx.hrl for example) in a release using rebar

查看:161
本文介绍了在使用螺纹钢的发行版中包含头文件(例如wx.hrl)的最佳方式是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在准备使用螺纹钢筋的应用程序的版本,我想知道从标准库中包含头文件的通常方法是什么。在我的情况下,它是wx.hrl文件,它包含在我的代码中的完全绝对路径。



我猜这不是正确的方法:o )

解决方案

  -include_lib(wx / include / wx.hrl)。 

这使预处理程序查找最新版本的 wx 应用程序在代码路径。有关详细信息,请参见此问题


I am preparing a release for an application using rebar, and I wonder what is the usual way to include header file from standard library. In my case, it is the wx.hrl file, which is included with its full absolute path in my code.

I guess that it is not the right way :o)

解决方案

-include_lib("wx/include/wx.hrl").

This makes the preprocessor look for the latest version of the wx application in the code path. See this question for more details.

这篇关于在使用螺纹钢的发行版中包含头文件(例如wx.hrl)的最佳方式是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆