Thread: help:compile log4cxx error

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    3

    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
    Registered User
    Join Date
    Aug 2009
    Posts
    3
    stay online and waiting...

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    3
    can anybody help me?

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    This is a forum, not IM. Wait 3 days (or maybe just 2 on this forum, since it's usually pretty active) before bumping it. Not 1 minute.

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Do you mean you have four files in one project, or four projects? If you have four projects, then can you build any of them? Do you have source code for the functions mentioned? Is that source code in the project you are trying to build? Why not?

  6. #6
    Registered User
    Join Date
    Aug 2009
    Posts
    1
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 02:39 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM

Tags for this Thread