Mac OS 编译第三方库(续)
来源:互联网 发布:java定时任务时间格式 编辑:程序博客网 时间:2024/05/15 06:09
1. Compile and installpkg-config:
(which is a program used to retrieve information about installed libraries)
Open Terminal.app and navigate to the newly-created pkg-config folder. Then, run the following commands in order, after the prior command has completed. If you’ve ever compiled anything from source in the command line before, this may be familiar (and will be, by the time we’re through):
./configure
make
sudo make install (be prepared to provide your password)
2. Compile and installgettext:
(which is a set of tools for multilanguage support in GNU applications)
Navigate to the gettext folder, and follow the same steps as before:
./configure
make
sudo make install
3. Compile and installlibiconv:
(which is a text encoding converter, used to convert between various character encodings in international text)
As before, navigate to the libiconv folder in your Downloads folder, and run your favorite three commands, entering your password for the third: ./configure, then make, then sudo make install.
4. Recompilegettext:
Yes. Believe it or not, but libiconv and gettext have circular dependencies and depend upon each other for certain features. While libiconv needed certain features from gettext to compile with crucial functionality enabled, gettext also requires libiconv to be installed in order to enable yet more features. This time, we have to clean out any trace of prior compilation, so we’re going to prefix a command like so:
make distclean
./configure
make
sudo make install
5. Compile and installGlib:
GLib is a core suite of libraries for unix- and or gnome-style applications written in C. This one is a bit bigger than the others, and also requires a bit of source code hacking to get installed. If you haven’t grabbed a snack yet, now’s a good time to, unless you are one of those people with an impeccably-clean keyboard and desk. First, we start the configuration process by navigating to the glib folder and running:
./configure
Once this is complete, we’ll need to replace 3 lines in a certain source file.
From what I understand, apple’s included libiconv doesn’t support 64bit, and I happen to be building a 64bit irssi. So, let’s make the changes below to make sure the libiconv that we’ve built is used. Navigate to the ‘glib’ folder (just plain glib, the one INSIDE of the main glib source folder), and open ‘gconvert.c’ with your favorite editor.
#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
#error GNU libiconv in use but included iconv.h not from libiconv
#endif
#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
#error GNU libiconv not in use but included iconv.h is from libiconv
#endif
replace the last 3 lines, like so:
#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
#error GNU libiconv in use but included iconv.h not from libiconv
#endif
#if !(defined(__APPLE__) && defined(__LP64__)) && !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
#error GNU libiconv not in use but included iconv.h is from libiconv
#endif
Save and close the file in place. Now you’re ready to compile and install glib:
make
sudo make install
- Mac OS 编译第三方库(续)
- Mac OS X 编译第三方库 10.6.4 (64bits)
- Mac OS下Xcode如何添加第三方.h库
- android studio添加第三方.os库
- FFMPEG第三方库编译
- 第三方库的编译
- ios 编译第三方库
- Jni 编译第三方库
- 第三方库编译启示
- 第三方库编译笔记
- mac下cocos2dx(带jsoncpp第三方库)编译为android项目心得
- Mac上python安装第三方库
- Python3 安装第三方库 (Mac)
- ffmpeg第三方库编译记录
- android ndk9 编译第三方so库
- Qt4第三方库QJSON编译说明
- OSG-VS2015编译第三方库
- 关于第三方库编译出错问题
- android 制作9.png图片
- uboot 命令行联想
- 计算控制文件的大小
- poj1014 &&hdu 1059dividing
- Android Application 创建全局变量
- Mac OS 编译第三方库(续)
- 第六堂课后作业
- C++友元类、友元函数
- cocos2d-x 学习点滴(5) Scene,Director, Layer 和 Sprite
- 让程序在崩溃时体面的退出之Unhandled Exception(转)
- ARM MMU工作原理剖析
- Java多线程总结
- 微软面试题<四>
- 国外程序员推荐:每个程序员都应读的书