Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: Build
    • Labels:
      None

      Description

      On Mar 20, 2008, at 3:50 AM, Andreas Grob wrote on log4cxx-user:

      Hi,

      Failed finding an option for ant to do it directly I did it hand made using the
      build-projects-vc8 option.

      For the libs apr, aprutil and log4cxx I open the properties dialog and changed
      the runtime library option to /MT (or /MTd for the debug lib).
      Building apr and aprutil works well. But log4cxx didn't link because there are
      missing dependencies. Well, not a big deal I had to add apr.lib and aprutil.lib
      to the additional dependencies option.

      should this not already be done by ant -Dbuild-projects-vc8?

      I'm looking forward for log4cxx release 0.10.0!

      Cheers
      ~ Andreas

        Activity

        Hide
        Curt Arnold added a comment -

        Commited fix in rev 639541

        To build a static log4cxx library which uses the static multithreaded C RTL use:

        ant -Dlib.type=static -Druntime=static -Dfind=false

        A dynamic log4cxx library which uses the static C RTL is unsafe since the API passes STL strings over the DLL boundary which can easily result in strings being allocated by one C RTL and freed by another. The unit tests will fail quickly with heap corruption assertions or access violations.

        Regarding the dependencies in the generated VC8 solutions. Unfortunately, the Microsoft Visual Studio.NET and later solution file (.sln) format is not obvious and cpptasks does not generate it like the VC6 .dsw file. I believe that I had some luck with a combination of a .dsw and .vcproj's, but since I wasn't planning on providing VC7 or later project files with the log4cxx 0.10.0 release, I didn't explore further. It looks like there is an analysis of the format at http://www.ondotnet.com/pub/a/dotnet/excerpt/vshacks_chap1/index.html?page=4.

        Show
        Curt Arnold added a comment - Commited fix in rev 639541 To build a static log4cxx library which uses the static multithreaded C RTL use: ant -Dlib.type=static -Druntime=static -Dfind=false A dynamic log4cxx library which uses the static C RTL is unsafe since the API passes STL strings over the DLL boundary which can easily result in strings being allocated by one C RTL and freed by another. The unit tests will fail quickly with heap corruption assertions or access violations. Regarding the dependencies in the generated VC8 solutions. Unfortunately, the Microsoft Visual Studio.NET and later solution file (.sln) format is not obvious and cpptasks does not generate it like the VC6 .dsw file. I believe that I had some luck with a combination of a .dsw and .vcproj's, but since I wasn't planning on providing VC7 or later project files with the log4cxx 0.10.0 release, I didn't explore further. It looks like there is an analysis of the format at http://www.ondotnet.com/pub/a/dotnet/excerpt/vshacks_chap1/index.html?page=4 .

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Curt Arnold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development