Link error migrating to .NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Cullen

    #1

    Link error migrating to .NET

    I have a VC6 project that I'm trying to migrate to VC.NET and it's
    driving me nuts.

    Link error LNK2005, operator delete already defined in nafxcwd.lib

    The project links OK in Release build, but not in Debug. I've looked at
    the project settings and for the life of me can't see any differences
    other than the obvious output file specs.

    I have read the KB article 148652 that deals with runtime libs being
    linked before MFC libs and it hasn't helped. The project builds fine in
    VC6. Every .cpp has #include "StdAfx.h".

    Can anybody offer a solution?

    Thanks
  • Pent

    #2
    Re: Link error migrating to .NET



    "Dave Cullen" <no_spam@mail.c om> wrote in message
    news:3FAA5ECC.7 D83CE0E@mail.co m...[color=blue]
    > I have a VC6 project that I'm trying to migrate to VC.NET and it's
    > driving me nuts.
    >
    > Link error LNK2005, operator delete already defined in nafxcwd.lib
    >
    > The project links OK in Release build, but not in Debug. I've looked at
    > the project settings and for the life of me can't see any differences
    > other than the obvious output file specs.
    >
    > I have read the KB article 148652 that deals with runtime libs being
    > linked before MFC libs and it hasn't helped. The project builds fine in
    > VC6. Every .cpp has #include "StdAfx.h".
    >
    > Can anybody offer a solution?
    >
    > Thanks[/color]


    Comment

    • Dave Cullen

      #3
      Re: Link error migrating to .NET

      Thank you. That led me to discover that the iostream.h is my problem.

      Dave

      Pent wrote:[color=blue]
      >
      > http://groups.google.com/groups?&q=L...languages.vc.*
      >
      > "Dave Cullen" <no_spam@mail.c om> wrote in message
      > news:3FAA5ECC.7 D83CE0E@mail.co m...[color=green]
      > > I have a VC6 project that I'm trying to migrate to VC.NET and it's
      > > driving me nuts.
      > >
      > > Link error LNK2005, operator delete already defined in nafxcwd.lib
      > >
      > > The project links OK in Release build, but not in Debug. I've looked at
      > > the project settings and for the life of me can't see any differences
      > > other than the obvious output file specs.
      > >
      > > I have read the KB article 148652 that deals with runtime libs being
      > > linked before MFC libs and it hasn't helped. The project builds fine in
      > > VC6. Every .cpp has #include "StdAfx.h".
      > >
      > > Can anybody offer a solution?
      > >
      > > Thanks[/color][/color]

      Comment

      Working...