logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Fester <Andreas.Fes...@gmx.de>
Subject Re: Linking problem
Date Thu, 08 Sep 2005 05:53:44 GMT
Hi Javier,

> inking...
> MyPrueba.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public:
void __thiscall log4cxx::Logger::forcedLog(class log4cxx::helpers::ObjectPtrT<class log4cxx::Level>
const &,class std::basic_string<char,struct std::char_traits<
> char>,class std::allocator<char> > const &,char const *,int)" (__imp_?forcedLog@Logger@log4cxx@@QAEXABV?$ObjectPtrT@VLevel@log4cxx@@@helpers@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDH@Z)
> MyPrueba.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public:
static void __cdecl log4cxx::PropertyConfigurator::configure(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (_
> _imp_?configure@PropertyConfigurator@log4cxx@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
> Debug/prueba.exe : fatal error LNK1120: 2 unresolved externals

This looks like the log4cxx.lib link library is not linked with your
project. Are you sure that you added it to the libraries of your project?
Otherwise, please post a minimal source code example, like

#include <log4cxx/logger.h>
[...]

int main() {
     PropertyConfigurator::configure(...);
     LoggerPtr logger = Logger::getLogger(...);
     LOG4CXX_FATAL(logger, ...);
}

> Also, how could I know wich libs/files should I deploy with my exe
> app ?

Regarding log4cxx, you need log4cxx.dll. Of course you need
any other third party library you are using. Its always a good
idea to test the deployment on a fresh installation of your
operating system before deploying them, virtual machines like
vmware or qemu can be of great help there.

Best Regards,

	Andreas

Mime
View raw message