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

来源:互联网 发布:arduino串口发送数据 编辑:程序博客网 时间:2024/05/16 01:00

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

How tobuild the environment of MSYS for the crossing compiler? has described theway to build the MSYS, and it is well to deal with the compiling issue ofFFMPEG. However, it has natural flaw to integrate multi-gcc compiler in thesame time, so How tobuild the environment of MSYS in the windows? provides a better solution toovercome the form disadvantages. For a good sample of the above article, thereare PKG_CONFIG_PATH and PERLIB environment variables to be declaredfor the appropriate searching path.

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

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

 The same situation is found when buildingFFMPEG 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 theadditional path for searching?

 

1. Use parameters of configuration. Fox example,--extra-cflags=’-I/include’ --extra-ldflags=’-L/lib’ --extra-libs=’-lXXX’ whenexecuting configurecommand.

 

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

 

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

 

2. Add the environment variables to notify of GCC wherethere are.

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

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 ofheader files.

 

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

 

[Summarization]

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

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

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

 

 

原创粉丝点击