Often times, you need c or gcc compiler to compile open source projects in Mac OS X. The problem is Mac OS X doesn’t install the gcc compiler by default.
If you try to install or compile some projects that required c/gcc compiler, following errors message will be logged :
In terminal, type “
gcc
“, you will get message “command not found”.Re: Compiling problem with x264 version Post by jgg » Tue Feb 17, 2009 11:55 am I guess is something related to x264 libraries version used in 0.9.8a and 0.9.0-test3, so they are not the same, but I don't know which version I need to install in order to get 0.9.0-test3 working. Compiling FFmpeg with NDI support on Mac OS. Contribute to johanels/macos-FFmpegNDI development by creating an account on GitHub. Brew install automake git nasm shtool texi2html theora wget fdk-aac lame opus sdl x264 x265 xvid libass libtool libvorbis libvpx. Step 3 - Get the FFmpeg source.
Solution
To install gcc compiler on Mac OS X, you need to download and install “Command Line Tools for Xcode”, which is available in Apple’s developer page. See following steps :
1. Register Apple Developer Account
Access Apple’s developer page, to process on the download, you need to register an Apple account, it’s free, but need to spend few minutes to fill in the survey.
2. Command Line Tools for Xcode
In Apple developer page, “Developer Tools” category, find “Command Line Tools for Xcode“, choose your version and click on the xx.dmg file (file size is 100mb ++) to start the download.
3. Installation
After .dmg file is downloaded, a small dialog will be prompted and show you this file – “Command Line Tools.mpkg“, just double click on it, follow the wizard guide to complete the installation.
4. Verification
After installation is completed, run “
gcc -v
” in terminal again. If everything fine, following output will be displayed. Done, the gcc version 4.2.1 is installed on Mac OS X successfully.
About the Author
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.Comments
- Online documentation
- Mailing list [email protected]
- HOWTO Contribute patches to x265
- HOWTO add a new encoder performance primitive
- HOWTO cross compile from Linux to Windows
- Regression test harness with profile-guided optimizations
- Profiling with VTune
- Helpful links
- Try the x265 Encoder, a 64 bit Windows application powered by x265.
Source release zip files can be downloaded from ftp.videolan.org or x265 Downloads page
To compile x265 you must first install Mercurial (or TortoiseHg on Windows)and CMake 2.8.8 or later.To ensure your build of x265 is capable of full performance, installYASM 1.2.0 or newer if you are using x265 v2.6 or older, orNASM 2.13 or newer if you are compiling from the default branch to compileassembly primitives. Then follow these easy steps:
For detailed instructions, consult our build README. Basic instructions are outlined below.
Linux Instructions
The primary target that we support is x86. x265 can also be built on linux platforms on ARM and POWERPC targets using the same build insructions above(exclude yasm from the list of packages on these targets). Our support for these platforms is growing as our user base on these platforms increase.
We also support cross-compilation for ARM targets from linux platforms on x86 targets by using the g++ arm cross-compiler. This has been tested on Ubuntu linux14.04 running on an x86 CPU. On other distributions, package names and names of cross compilation tools may differ. This is an experimental feature, and has undergone very limited testing.
Windows (Visual Studio) Instructions
Then run make-solutions.bat in the build folder that corresponds toyour favorite compiler, configure your build options, click 'configure',click 'generate', then close cmake-gui. You will be rewarded with anx265.sln file. Also see cmakedocumentation.
Mac OS X
The latest Mac OS X 10.8 gcc and clang based compilers can build x265using the linux instructions above. Xcode 5 with the most recentpatches can build, debug, and profile x265.
Intel Compiler Instructions
On Windows, after installing the Intel C-compiler, right-click on the 'Solution x265'inside the solution explorer window, select 'Intel Compiler -> Use Intel C++', andrebuild x265.
On Linux, you can tell cmake to build Makefiles for icpc directly. Thisrequires you to have configured the Intel compiler environment (bysourcing the appropriate shell script). For example:
![Compiling Compiling](/uploads/1/2/5/8/125859207/825628552.png)
Multilib build instructions
Applications like ffmpeg and the x265 CLI which use our bit-depthintrospection API (x265_api_get) instead of the globally exported Cinterface can select between 8 and 10bit libx265 libraries at runtime.To support this both libraries must be available either as sharedlibraries or as a pair of static libraries.
For shared libraries, just rename your 10bit libx265 aslibx265_main10.[so|dll|dylib] and place it into your library load path.
For static libraries, you must disable the exported C APIs, since theywould conflict with each other. For linux/Mac, you can use or adaptthe build/linux/multilib.sh script. For Windows, there are similarvc*-x86_64/multilib.bat files that demonstrate how combined staticlibraries can be built.
See also multilib docs.
The Makefile/solution builds a static encoder.lib library and a standalonex265 executable that aims to be similar to x264 in its commandline interface. Running without arguments shows you the command linehelp. See also the online documentation
Updated