1: 编译到X86环境, 正常步骤如下
./configure --prefix=/usr/local
make
make install
2: 如果不想依赖expat解析器,我们可以加:
--without-expat
3:如果我们要指定软件运行的系统平台,交叉环境下,我们可以用--host选项来设置,如果运行在arm平台下就加--host=arm-linux,如果是运行在mips平台下就加--host=mips-linux
./configure --build=i686-pc-linux --host=arm-linux --prefix=/home/armlog4c 指示 编译环境 是 I686-PC-linx 目标环境 是 arm-linx 安装路径 是 /home/armlog4c 4: 如果安装完的时候出现了以下错误,不要着急:../../src/log4c/.libs/liblog4c.so: undefined reference to `rpl_malloc'
../../src/log4c/.libs/liblog4c.so: undefined reference to `rpl_realloc'
解决方法如下:
修改log4c_build/log4c-1.2.1/src/config.h.in文件:
将201行的#undef malloc注释掉。
将204行的#undef realloc注释掉 然后执行以下命令:
./configure(同样有必要的情况下加上相应的选项)
make clean
make
make install
5: 将安装在/home/armlog4c 目录下的 lib include 文件拷贝到arm环境中去即可;