Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Converting very old VC++ to VS2005 and MSXML

Converting very old VC++ to VS2005 and MSXML

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpvisual-studiocom
14 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Stuart Dootson

    Add your local directory to the C++->General->Additional Include Directories property (Debug AND Release). That should mean the compiler sees your local msxml.h before (and instead of) the Platform SDK one. Or, change the msxml #includes to

    #include "./msxml.h"

    I think that might work as well?

    Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

    G Offline
    G Offline
    gartnerj
    wrote on last edited by
    #3

    Thanks -- actually DID include the local dir to resolve a few other issues -- this one is the only one I have left outstanding at the moment (at least until THIS one clears and the compilation finds something else :wtf: ) I have tried the "./msxml.h" also, but I am still getting that error message (I even put in the entire path, same result).

    S 1 Reply Last reply
    0
    • G gartnerj

      Thanks -- actually DID include the local dir to resolve a few other issues -- this one is the only one I have left outstanding at the moment (at least until THIS one clears and the compilation finds something else :wtf: ) I have tried the "./msxml.h" also, but I am still getting that error message (I even put in the entire path, same result).

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #4

      gartnerj wrote:

      I have tried the "./msxml.h" also, but I am still getting that error message (I even put in the entire path, same result).

      Well, that's spooky. Have you changed ALL #includes of msxml.h? Try checking stdafx.h and rebuilding from scratch.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      G 1 Reply Last reply
      0
      • S Stuart Dootson

        gartnerj wrote:

        I have tried the "./msxml.h" also, but I am still getting that error message (I even put in the entire path, same result).

        Well, that's spooky. Have you changed ALL #includes of msxml.h? Try checking stdafx.h and rebuilding from scratch.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        G Offline
        G Offline
        gartnerj
        wrote on last edited by
        #5

        Yeah, really strange. There are only two references to #include "msxml.h" in the project: 1)a generated MSXML.cpp file 2)a DataParse.h (which is where a bunch of custom parsing code is defined). No other #include of msxml.h at all!!:confused:

        L 1 Reply Last reply
        0
        • G gartnerj

          Yeah, really strange. There are only two references to #include "msxml.h" in the project: 1)a generated MSXML.cpp file 2)a DataParse.h (which is where a bunch of custom parsing code is defined). No other #include of msxml.h at all!!:confused:

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #6

          Add or make sure the following is in your stdafx.h#ifndef VC_EXTRALEAN #define VC_EXTRALEAN #endif
          How to use VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to enhance the build process in Visual C++[^] Let me know if this works. Best Wishes, -David Delaune

          G 1 Reply Last reply
          0
          • L Lost User

            Add or make sure the following is in your stdafx.h#ifndef VC_EXTRALEAN #define VC_EXTRALEAN #endif
            How to use VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to enhance the build process in Visual C++[^] Let me know if this works. Best Wishes, -David Delaune

            G Offline
            G Offline
            gartnerj
            wrote on last edited by
            #7

            Thanks David, I had seen the WIN_LEAN_AND_MEAN setting and had tried that with no luck. I tried the VC_EXTRALEAN, and I still get the errors:

            DataParse.cpp
            e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
            error C2011: 'XMLDOMDocumentEvents' :
            'struct' type redefinition
            c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) :
            see declaration of 'XMLDOMDocumentEvents'
            MSXML.cpp
            e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
            error C2011: 'XMLDOMDocumentEvents' :
            'struct' type redefinition
            c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) : see declaration of 'XMLDOMDocumentEvents'

            No joy yet.

            G L S 3 Replies Last reply
            0
            • G gartnerj

              Thanks David, I had seen the WIN_LEAN_AND_MEAN setting and had tried that with no luck. I tried the VC_EXTRALEAN, and I still get the errors:

              DataParse.cpp
              e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
              error C2011: 'XMLDOMDocumentEvents' :
              'struct' type redefinition
              c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) :
              see declaration of 'XMLDOMDocumentEvents'
              MSXML.cpp
              e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
              error C2011: 'XMLDOMDocumentEvents' :
              'struct' type redefinition
              c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) : see declaration of 'XMLDOMDocumentEvents'

              No joy yet.

              G Offline
              G Offline
              gartnerj
              wrote on last edited by
              #8

              Actually, looking in the code, the stdafx.h file HAS the define for VC_extralean - must have done that during the conversion up to VS2005!

              1 Reply Last reply
              0
              • G gartnerj

                Thanks David, I had seen the WIN_LEAN_AND_MEAN setting and had tried that with no luck. I tried the VC_EXTRALEAN, and I still get the errors:

                DataParse.cpp
                e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
                error C2011: 'XMLDOMDocumentEvents' :
                'struct' type redefinition
                c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) :
                see declaration of 'XMLDOMDocumentEvents'
                MSXML.cpp
                e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
                error C2011: 'XMLDOMDocumentEvents' :
                'struct' type redefinition
                c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) : see declaration of 'XMLDOMDocumentEvents'

                No joy yet.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #9

                :(( Ok, lets be patient and work through this. First thing you need to do is find out where msxml.h is being included. Do you have #include <urlmon.h> included anywhere? Best Wishes, -David Delaune

                S G 2 Replies Last reply
                0
                • L Lost User

                  :(( Ok, lets be patient and work through this. First thing you need to do is find out where msxml.h is being included. Do you have #include <urlmon.h> included anywhere? Best Wishes, -David Delaune

                  S Offline
                  S Offline
                  Stuart Dootson
                  wrote on last edited by
                  #10

                  Windows.h #includes Ole2.h which #includes ObjBase.h which #includes urlmon.h No way round getting the SDKs msxml.h, as far as I can tell.

                  Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                  1 Reply Last reply
                  0
                  • G gartnerj

                    Thanks David, I had seen the WIN_LEAN_AND_MEAN setting and had tried that with no luck. I tried the VC_EXTRALEAN, and I still get the errors:

                    DataParse.cpp
                    e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
                    error C2011: 'XMLDOMDocumentEvents' :
                    'struct' type redefinition
                    c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) :
                    see declaration of 'XMLDOMDocumentEvents'
                    MSXML.cpp
                    e:\....\graphing\mpactgrafx activex control\msxml.h(977) :
                    error C2011: 'XMLDOMDocumentEvents' :
                    'struct' type redefinition
                    c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(9495) : see declaration of 'XMLDOMDocumentEvents'

                    No joy yet.

                    S Offline
                    S Offline
                    Stuart Dootson
                    wrote on last edited by
                    #11

                    A suggestion. Stuff your local msxml.h inside a namespace when #including it:

                    namespace Old
                    {
                    #include "msxml.h"
                    }

                    and then explicitly specify the namespace when using the structures out of your local file - e.g.

                    Old::XMLDOMDocumentEvents events;

                    Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                    G 2 Replies Last reply
                    0
                    • L Lost User

                      :(( Ok, lets be patient and work through this. First thing you need to do is find out where msxml.h is being included. Do you have #include <urlmon.h> included anywhere? Best Wishes, -David Delaune

                      G Offline
                      G Offline
                      gartnerj
                      wrote on last edited by
                      #12

                      Just checked, and NO, no ulrmon.h in any of the project files.

                      1 Reply Last reply
                      0
                      • S Stuart Dootson

                        A suggestion. Stuff your local msxml.h inside a namespace when #including it:

                        namespace Old
                        {
                        #include "msxml.h"
                        }

                        and then explicitly specify the namespace when using the structures out of your local file - e.g.

                        Old::XMLDOMDocumentEvents events;

                        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                        G Offline
                        G Offline
                        gartnerj
                        wrote on last edited by
                        #13

                        I'll have to give that a try -- will try to get to it later this morning -- working on a different project at the moment!

                        1 Reply Last reply
                        0
                        • S Stuart Dootson

                          A suggestion. Stuff your local msxml.h inside a namespace when #including it:

                          namespace Old
                          {
                          #include "msxml.h"
                          }

                          and then explicitly specify the namespace when using the structures out of your local file - e.g.

                          Old::XMLDOMDocumentEvents events;

                          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                          G Offline
                          G Offline
                          gartnerj
                          wrote on last edited by
                          #14

                          Stuart -- thanks. Using the namespace seems to have worked (at least, it got rid of the compilation errors and let me build the project). Thanks folks for all of the help!!! :-D

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups