Menu

Link problem on MSVC6

Help
Dave Derry
2002-06-07
2003-07-23
  • Dave Derry

    Dave Derry - 2002-06-07

    Hi,

    I've just downloaded version 0.2.7 and built it on NT2000 under VC__6.0. However, when I try linking into the application that I am working on I get several messages like this one:
    msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char,s
    truct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z) already defined in CriteriaTableReader.obj

    All the errors seem to be associated with stl classes. I didn't have these errors before.

    Can anybody help me with this?

    Thanks,
    Dave Derry

     
    • A Acharya

      A Acharya - 2003-01-18

      I'm having the exact same problem.  Even the most basic test gives me these linking errors.  If anyone has _any_ idea of how to fix them, or even begin fixing them, that would be greatly appreciated.

      Thanks in advance,

      Anish

       
    • RAGHAVAN RAMANATHAN

      I'm also facing the same problem.
      Any help on this would be greately appreciated.

      Thanks in advance.

      Raghavan

       
    • Bastiaan Bakker

      Bastiaan Bakker - 2003-03-05

      Could any of you try log4cpp 0.3.4, and report the results?

      Regards,

      Bastiaan Bakker

       
      • RAGHAVAN RAMANATHAN

        I tried building the log4cpp v0.3.4 project on VC++6.0. I got the following errors.

        Deleting intermediate files and output files for project 'log4cpp - Win32 Debug'.
        --------------------Configuration: log4cpp - Win32 Debug--------------------
        Performing Custom Build Step on ..\NTEventLogCategories.mc
        The system cannot find the path specified.
        RC : fatal error RC1110 : could not open .\Debug\NTEventLogCategories.rc
        The system cannot find the path specified.
        Error executing c:\winnt\system32\cmd.exe.

        log4cppD.lib - 1 error(s), 0 warning(s)

        Plz. help.

        Raghavan.

         
    • Bastiaan Bakker

      Bastiaan Bakker - 2003-03-07

      Hmm, looks like a missing file. Unfortunately I can't help you very much with it, since I don't develop on Win32 platforms myself.
      Things you can try:

      Compile without NTEventLogAppender (change the #ifdef WIN32  in the .hh and .cpp files to WIN32DONT or something). Maybe you need to modify the MSVC++ project files as well.

      Post your problem to the log4cpp-devel mailing list.

      I'm leaving for a week on holiday tonight, so if I'm unresponsive it's because I'm skiing.
      Anyway, good luck,

      Bastiaan

       
    • Tim Jones

      Tim Jones - 2003-07-23

      I had the same problem;  here's the issue.

      Whatever application you are using, it must be linked with the same version of libraries log4cpp.  log4cpp is using the /MD option (multi-threaded dll).  This can be changed  on a project in Project->Settings, C-C++ tab, Code Generation Catafory.  In the "use runtime library" dropdown select "Multithreaded Dll" (or "Debug Multithreaded Dll" if you are using the debug .lib).

      I'm not a vc++ guru, so I am curious as to why log4cpp is linked with the Dll libs for making a .lib.  I changed it to the "Multithreaded" option and recompiled; I guess we'll see if that works.

      Tim

       

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.