help:compile log4cxx error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 15

Thread: help:compile log4cxx error

  1. #1
    Join Date
    Aug 2009
    Posts
    9

    Unhappy 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"

  2. #2
    Join Date
    Aug 2009
    Posts
    9

    Re: help:compile log4cxx error

    stay online and waiting

  3. #3
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,256

    Re: help:compile log4cxx error

    Supply a link to where we can download the project files.

  4. #4
    Join Date
    Aug 2009
    Posts
    9

    Re: help:compile log4cxx error


  5. #5
    Join Date
    Apr 1999
    Posts
    27,427

    Re: help:compile log4cxx error

    Quote Originally Posted by zealot2007 View Post
    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

  6. #6
    Join Date
    Aug 2009
    Posts
    9

    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'

  7. #7
    Join Date
    Aug 2009
    Posts
    9

    Re: help:compile log4cxx error

    can anyone help me?

  8. #8
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,256

    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.

  9. #9
    Join Date
    Jul 2005
    Location
    E: 120.6, N: 31.3′
    Posts
    795

    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.
    Little by little one goes far
    Keep moving.......!
    Nothing is impossible !

  10. #10
    Join Date
    Aug 2009
    Posts
    9

    Unhappy Re: help:compile log4cxx error

    but how can i get vs2008 sln of log4cxx , i search from apache official site and nothing is found

  11. #11
    Join Date
    Aug 2009
    Posts
    9

    Re: help:compile log4cxx error

    Quote Originally Posted by sunny_sz View Post
    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?

  12. #12
    Join Date
    Aug 2009
    Posts
    9

    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

  13. #13
    Join Date
    Jul 2005
    Location
    E: 120.6, N: 31.3′
    Posts
    795

    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.
    Little by little one goes far
    Keep moving.......!
    Nothing is impossible !

  14. #14
    Join Date
    Jul 2005
    Location
    E: 120.6, N: 31.3′
    Posts
    795

    Re: help:compile log4cxx error

    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!
    Little by little one goes far
    Keep moving.......!
    Nothing is impossible !

  15. #15
    Join Date
    Aug 2009
    Posts
    9

    Re: help:compile log4cxx error

    Thanks all , I roll back to log4cxx-0.9.7 and build it successfully, it can work.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center