FFMPEG Understanding(7. How to solve the issue of searching path?)

本文介绍了在Windows环境下使用MSYS构建FFmpeg跨平台编译环境的方法。通过配置环境变量和使用配置参数解决依赖库路径搜索的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

FFMPEG Understanding(7. How to solve the issue of searching path?)

How to build the environment of MSYS for the crossing compiler? has described the way to build the MSYS, and it is well to deal with the compiling issue of FFMPEG. However, it has natural flaw to integrate multi-gcc compiler in the same time, so How to build the environment of MSYS in the windows? provides a better solution to overcome the form disadvantages. For a good sample of the above article, there are PKG_CONFIG_PATH and PERLIB environment variables to be declared for the appropriate searching path.

StepD03: Edit /etc/profile and add “export PKG_CONFIG_PATH=/lib/pkgconfig:/mingw/lib/pkgconfig:$PKG_CONFIG_PATH

StepD04: Edit /etc/profile and add "export PERLLIB=/usr/share/autoconf/Autom4te:/usr/share/automake-1.9:$PERLLIB "

  The same situation is found when building FFMPEG because it depends on the extension libraries located in the ‘/lib ’ folder, but unfortunately, it does not been included to search in the GCC.

 

How to add the additional path for searching?

 

1. Use parameters of configuration. Fox example, --extra-cflags=’-I/include’ --extra-ldflags=’-L/lib’ --extra-libs=’-lXXX’ when executing configure command.

 

It seems that it is good solution to fix it, but I do not like typing so many characters when compiling all programs utilizing the ‘/lib ’ folder.

 

Now, the problem is whether I can take a better measure to do it once for ever! Yes, please refer to solution 2.

 

2. Add the environment variables to notify of GCC where there are.

Open ‘/etc/profile ’, and add two entries as follows.

export C_INCLUDE_PATH=.:/include:/mingw/include:$C_INCLUDE_PATH

export LIBRARY_PATH=.:/lib:/mingw/lib:$LIBRARY_PATH

--- C_INCLUDE_PATH indicates where the header files are.

--- LIBRARY_PATH points out the home of the libraries of header files.

 

Here, compiling it again. What’s happen:- )?

 

[Summarization]

1. The two solutions are based on the MSY established by How to build the environment of MSYS in the windows? . If the configuration is different, maybe there are no any issues in these aspects.

2. When the alternative is available, we should select the more valuable option for future. In our case, I prefer option2.

3. Familiar with GCC is very important to set the environment variables. It needs track GCC to gain more in our daily activities. Simple words – constantly self-building!

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值