help:compile log4cxx error
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"
Re: help:compile log4cxx error
Re: help:compile log4cxx error
Supply a link to where we can download the project files.
Re: help:compile log4cxx error
Re: help:compile log4cxx error
Quote:
Originally Posted by
zealot2007
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?
The errors are linker errors, not compiler errors. Therefore "include" directories really do not mean anything, since include files are only used by the compiler, not the linker.
Where are those functions located that the linker is complaining about? Are they in another library? If so, you have to specify that library somewhere in your linker settings.
Regards,
Paul McKenzie
Re: help:compile log4cxx error
I add aprutil-1.lib to additional dependencies,but another error occurs
LINK : fatal error LNK1181: cannot open input file 'aprutil-1.lib'
Re: help:compile log4cxx error
Re: help:compile log4cxx error
Ask apache to give you an updated project/solution. That VC6 solution is 11 years old. When I tried to update it to VC2008 it told me several of the projects were corrupt. I then unzipped fresh and loaded the project file. After conversion, I compiled and there were 137 errors.
Re: help:compile log4cxx error
There is Visual C++ 6.0 version only in my pc, but seeing from you post above, I guess that lack of specified files (e.g. .LIB etc) may cause also, please double check.
Re: help:compile log4cxx error
but how can i get vs2008 sln of log4cxx , i search from apache official site and nothing is found
Re: help:compile log4cxx error
Quote:
Originally Posted by
sunny_sz
There is Visual C++ 6.0 version only in my pc, but seeing from you post above, I guess that lack of specified files (e.g. .LIB etc) may cause also, please double check.
but i dont know what lib is lack of ,can you speak in detail?
Re: help:compile log4cxx error
I roll back to log4cxx-0.9.7, it can build successfully and generates log4cxxs.lib and log4cxx.dll.embed.manifest.
why it generates log4cxx.dll.embed.manifest but log4cxx.dll
Re: help:compile log4cxx error
Those codes are written by yourself? and what kinds of plateform you are using? You have to go at these points first.
Re: help:compile log4cxx error
Quote:
but i dont know what lib is lack of ,can you speak in detail?
The files you provide so many and I am using VC6 environment not you are using, I cannot be sure you are missing what lib file, you have to read up your codes and find out. Good luck!
Re: help:compile log4cxx error
Thanks all , I roll back to log4cxx-0.9.7 and build it successfully, it can work.