Menu

#135 Build log4cpp-1.1 using C++ Builder XE

Fixed
closed-fixed
None
3
2014-08-24
2013-10-10
Deepti
No

Steps To Build log4cpp-1.1 on your machine using C++ Builder XE :
1. Try to Open log4cpp\bcb5\log4cpp\log4cpp.bpr (log4cpp borland Project file)
2. A pop up opens with title Upgrading Project. Just press OK
3. Build log4cpp.dll. It compiles and throws an error stating.
[BCC32 Fatal Error] ConfiguratorSkeleton.cpp(1): F1009 Unable to open input
file '....\src\ConfiguratorSkeleton.cpp'
Fix
Expand the log4cpp.dll in Project Manager window. go to src folder and select the file ConfiguratorSkeleton.cpp. right click - select Remove from project.Compile Again.
4. This time you get errors complaining about following files :
[ILINK32 Error] Error: Unresolved external 'log4cpp::localtime(const long , std::tm )' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PATTERNLAYOUT.OBJ
[ILINK32 Error] Error: Unresolved external 'log4cpp::AbortAppender::~AbortAppender()' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PROPERTYCONFIGURATORIMPL.OBJ
[ILINK32 Error] Error: Unresolved external 'log4cpp::Win32DebugAppender::~Win32DebugAppender()' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PROPERTYCONFIGURATORIMPL.OBJ
[ILINK32 Error] Error: Unresolved external 'log4cpp::NTEventLogAppender::~NTEventLogAppender()' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PROPERTYCONFIGURATORIMPL.OBJ
[ILINK32 Error] Error: Unresolved external 'log4cpp::AbortAppender::AbortAppender(std::basic_string<char, std::char_traits<char="">, std::allocator<char> >&)' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PROPERTYCONFIGURATORIMPL.OBJ
[ILINK32 Error] Error: Unresolved external 'log4cpp::Win32DebugAppender::Win32DebugAppender(std::basic_string<char, std::char_traits<char="">, std::allocator<char> >&)' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PROPERTYCONFIGURATORIMPL.OBJ
[ILINK32 Error] Error: Unresolved external 'log4cpp::NTEventLogAppender::NTEventLogAppender(std::basic_string<char, std::char_traits<char="">, std::allocator<char> >&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >&)' referenced from ..\LOG4CPP\BCB5\LOG4CPP\DEBUG_BUILD\PROPERTYCONFIGURATORIMPL.OBJ
[ILINK32 Error] Error: Unable to perform link
Fix
On Project Manager go to log4cpp.dll. Right click Add...
Navigate to Log4cpp\src folder and Select the following files:
• AbortAppender.cpp,
• NTEventLogAppender.cpp,
• Win32DebugAppender.cpp
• Localtime.hh
5. Save Compile again. You get some kind of linker error.
Fix
Go to Project- > Options->Under C++ Compiler Select Directories and conditionals ->Select the Conditional defines ellipses. Type WIN32. Add.

Discussion

  • Alexander Perepelkin

    • assigned_to: Alexander Perepelkin
    • Priority: 1 --> 3
     
  • Alexander Perepelkin

    Deepti,

    Thank you for this report.
    I committed your fixes to the project files to cvs.
    I edited project files for Builder 5, I guess they will be propagated to Builder XE well when upgrading the project.
    Would you check that project now builds ok please?
    Two new files (log4cpp.bpf, log4cpp.bpr) you may want to checkout via cvs or find here:
    http://log4cpp.cvs.sourceforge.net/viewvc/log4cpp/log4cpp/bcb5/log4cpp/

    Alex.

     
  • Alexander Perepelkin

    • status: open --> closed-fixed
    • Group: Works for Me --> Fixed
     
  • Alexander Perepelkin

    Described fix works well for Builder 5.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.