Using the dynamic runtime library?

Developers
Decept
2007-07-25
2013-06-04
  • Decept

    Decept - 2007-07-25

    I'm trying to compile the whole dirac solution in Visual Studio 2005 with the dynamic runtime library, but so far I have been unsuccesfull. It compiles just fine with the static runtime.

    My goal is to compile dirac encoder/decoder to static lib files that I can then use in my own app. The problem is that my app is using the dynamic runtime and dirac uses the static one, which results in a pile of errors such as "error LNK2005: ...already defined in msvcprt.lib".

    It seems that for some reason the static runtime is used somewhere but I can't find where. I double checked that every project and configuration in the dirac solution is set to "Multi-threaded DLL (/MD)" or "Multi-threaded Debug DLL (/MDd)".

    When I rebuild the whole solution these are the projects/configurations that fail:

    DiracDecoder release-mmx, release
    DiracEncoder release-mmx, release
    EncodeDirac static-release-mmx,  static-release
    DecodeDirac static-release-mmx,  static-release

    Any help would be much appreciated

     
    • Anuradha Suraparaju

      Are these errors reported when building dirac 0.7.0 release?

       
    • Decept

      Decept - 2007-07-25

      yes

       
    • Decept

      Decept - 2007-07-26

      I unpacked a clean copy of dirac to try again. This time I only changed these projects to the dynamic runtime and only their static-release and release configurations:

      DecodeDirac
      DiracDecoder
      libdirac_byteio
      libdirac_common
      libdirac_decoder

      When I try to compile in static-release I still get errors, here is one typical error:

      msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in libdirac_byteio.lib(byteio.obj)

      It looks to me like it complains about that functions from the dynamic runtime are already defined in libdirac_byteio.lib. That is, no conflict between static and dynamic runtime. But why does it complain if both are already using the dynamic runtime. I tried to set all the libs that DecodeDirac is using to NODEFAULTLIBS but it didn't change a thing.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks