Re: [Log4cplus-devel] Problems linking log4cplus 1.0.3 in VisualStudio 2005 project
Logging Framework for C++
Brought to you by:
wilx
From: Václav H. <wi...@us...> - 2009-11-03 18:36:23
|
heapifyman wrote, On 3.11.2009 17:49: > Hello all, > > I managed to successfully build log4cplus in Visual Studio 2005 and now > am trying to use it in my C++ project. > > In my project settings, I added the log4cplus include dir to Additional > Includedirectories and also the msvc8\log4cplus_dll.Debug directory to > Additional Librarydirectories. Further, I added log4cplusD.lib to my > Linker-->Input-->Additional Dependencies (sorry if the setting's names > are not correct, I only have the German version here. > > However, when building the project I get the following error in the > Linking step: > error LNK2019: Verweis auf nicht aufgelöstes externes Symbol > ""__declspec(dllimport) public: void __thiscall > log4cplus::Logger::forcedLog(int,class std::basic_string<unsigned > short,struct std::char_traits<unsigned short>,class ^^^^^^^^^^^^^^ Your project appears to be compiling without the "Treats wchar_t as built-in type" option /Zc:wchar_t. The log4cplus MSVC projects are set up with the option set so that wchar_t is a distinct type instead of alias for unsigned short. You could try turning the option off in log4cplus project or (which I would recommend) turning the option on in your application/project. > std::allocator<unsigned short> > const &,char const *,int)" > (__imp_?forcedLog@Logger@log4cplus@@QAEXHABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@PBDH@Z)" > in Funktion ""public: __thiscall > Plateau::MyPlugin_impl::MyPlugin_impl(void)" > (??0MyPlugin_impl@Plateau@@QAE@XZ)". > > Am I missing anything in my includes or library dependencies? > > Is there some documentation available on how to setup a VS 2005 project > with log4cplus support? > > I'd appreciate any help. -- wilx |