Studio编译log4cxx错误之一解决办法!

简介: I compiled log4cxx on my computer,(os:xp, IDE:vs2008)I have 4 project folders in one same directory,(apr,apr-util,apr-iconv,apache-log4cxx),an...
I compiled log4cxx on my computer,(os:xp, IDE:vs2008)
I have 4 project folders in one same directory,(apr,apr-util,apr-iconv,apache-log4cxx),and open apache-log4cxx dsw and set it as startup and build.
apr,apr-util , log4cxx and xml are all compiled successfully, but when linking,it occurs errors below.
I try to add apr-iconv/include dir to log4cxx,but it dosen't matter. why?
.......
asyncappender.cpp
aprinitializer.cpp
appenderskeleton.cpp
appenderattachableimpl.cpp
action.cpp
Generating Code...
Compiling resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
Creating library .\Debug/log4cxx.lib and object .\Debug/log4cxx.exp
aprutil-1.lib(xlate.obj) : error LNK2019: unresolved external symbol _apr_iconv_open@16 referenced in function _apr_xlate_open@16
aprutil-1.lib(xlate.obj) : error LNK2019: unresolved external symbol _apr_iconv_close@8 referenced in function _apr_xlate_cleanup
aprutil-1.lib(xlate.obj) : error LNK2019: unresolved external symbol _apr_iconv@24 referenced in function _check_sbcs
.\Debug/log4cxx.dll : fatal error LNK1120: 3 unresolved externals
Build log was saved at file://e:\cpp_dev\apache-log4cxx\projects\Debug\BuildLog.htm
 
Answer:
did you run configure-aprutil.bat ?
there is no sed util on windows by default, so it probably did notheng, then try to do it with your own hands
sed -i -e "s/#define APU_HAVE_APR_ICONV\b.*/#define APU_HAVE_APR_ICONV 0/" ..\apr-util\include\apu.hw
sed -i -e "s/#define APR_HAS_LDAP\b.*/#define APR_HAS_LDAP 0/" ..\apr-util\include\apr_ldap.hw

it means find the macro definition of APR_HAS_LDAP, APU_HAVE_APR_ICONV and set it to 0. originaly they are defined as 1.
目录
相关文章
|
XML Java 数据格式
支付系统----微信支付20---创建案例项目--集成Mybatis-plus的补充,target下只有接口的编译文件,xml文件了,添加日志的写法
支付系统----微信支付20---创建案例项目--集成Mybatis-plus的补充,target下只有接口的编译文件,xml文件了,添加日志的写法
|
缓存 Oracle Java
Flink CDC编译问题之编译后看不到变更日志如何解决
Flink CDC编译指的是将Flink CDC源代码转换成可执行程序的过程,可能会涉及到依赖管理和环境配置等问题;本合集将介绍Flink CDC编译的步骤、常见错误及其解决办法,以确保顺利完成编译过程。
|
监控 前端开发
Webpack 2 视频教程 005 - Webpack 编译输出日志
原文发表于我的技术博客 这是我免费发布的高质量超清「Webpack 2 视频教程」。 Webpack 作为目前前端开发必备的框架,Webpack 发布了 2.0 版本,此视频就是基于 2.0 的版本讲解的。
1335 0
|
分布式计算 Java Hadoop
03【在线日志分析】之hadoop-2.7.3编译和搭建集群环境(HDFS HA,Yarn HA)
环境:CentOS6.5 1.下载hadoop2.7.3最新源码[root@sht-sgmhadoopnn-01 ~]# mkdir -p learnproject/compilesoft[root@sht-sgmhadoopnn-01 ~]# c...
1382 0
|
消息中间件 监控 Java
07【在线日志分析】之kafka-manager监控工具的搭建(sbt安装与编译)
1.下载sbthttp://www.scala-sbt.org/download.html [root@sht-sgmhadoopnn-01 app]# rzrz waiting to receive.
1679 0
|
监控 Android开发 Java
01【在线日志分析】之Flume-1.7.0源码编译导入eclipse
【前提】: 1.windows 7 安装maven-3.3.9   其中在conf/setting.xml文件添加   D:\software\apache-maven-3.
1549 0