Menu

MSVC7 How to

Help
2003-11-23
2013-05-20
  • Mark Saward

    Mark Saward - 2003-11-23

    Hi,

    After a number of hours I finally managed to get them to compile.  Took me longer than it would most, since I'm unfamiliar with MSVC.  I thought I'd share what I did, but the instructions are vague at some points.

    I opened the log4cppDLL file in a text editor - I can't remember which, but it was one of the project files.  Scrolling down near the end you will see two Custom Build entries, one for retail, and one for debug.  This is where I had the troubles - it was not properly referencing the files.  So I changed the three command (mc.exe RC.exe and link.exe) so that any references to folders or files by variables was replaced with the full path and file name hard coded.  Once I had that working, it compiled.  You only need to compile the log4cppDLL project, none of the others, so don't worry about them.  So when building, right click on that project and select build, don't try to build the whole project.

    Hope that helps.

     
    • Anonymous

      Anonymous - 2007-12-07

      The name of the file that the paths need to be changed is

      log4cpp-1.0\msvc6\log4cppDLL.vcproj

      Once the proper paths were assigned, I encountered a problem with the mc.exe. Visual studio is using MC.Exe instead of mc.exe. This is the error message

      MC: may only specify one message file to compile.
      MC: may only specify one message file to compile.
      MC: may only specify one message file to compile.
      Microsoft (R) Message Compiler  Version 1.12.2505
      Copyright (c) Microsoft Corporation. All rights reserved.
      usage: MC [-?aAcdnosuUvw] [-m maxmsglen] [-h dirspec] [-e extension] [-r dirspec] [-x dbgFileSpec] filename.mc

      I am using Visual Studio 2005 and can update if that makes a difference

       
      • BaZ

        BaZ - 2007-12-14

        Hi,

        Using the msvs7 folder solves a lot of problems. Using the msvs7 folder, I also encountered the "MC: may only specify one message file to compile. " error. Try choosing the "Debug" configuration instead of "Debug with Boost" and compiling is no problem anymore (what is "Boost"?).

        Two problems remain:

        1. A compile problem occurs in the append member function of PatterLayout.cpp with the usage of localtime. Change it into "std::localtime", use the "currentTime" as pointer and the problem is gone.

        2. The testDLL won't compile (unresolved external symbols). I think that project or program is not properly configured for using a DLL. Test programs using the library are working fine.

        Kind regards,

        BaZ

         
    • BaZ

      BaZ - 2007-12-10

      Hi,

      I encountered the same problems. I also found that there exists a MSVS7 folder but that is not included in the package (I don't know why). It should be possible to download the folder via CVS. I haven't tested that yet.

      BaZ

       
    • Chandan.R

      Chandan.R - 2008-04-19

      Yes that helped. Thanks.

       

Log in to post a comment.

MongoDB Logo MongoDB