#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Seattle WA
    Posts
    863
    Rep Power
    14

    Building xerces in vs7


    I'm trying to build xerces in vs7, but I'm getting (about 180 instances) of an unresolved external. Specifically the XMemory copy constructor isn't implemented. Funny thing is, in the header file, they explicitly say it's unimplemented.

    So...um...how?

    Specifically, anyone know what I'm supposed to do with the class so I can build the library? It doesn't have any data members, so I'm tempted to just comment out the copy ctor and let the compiler deal with it automatically...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Seattle WA
    Posts
    863
    Rep Power
    14
    Three hours of searching revealed this and a bunch of related threads at the apache mailing lists.

    Briefly, yes, the function implementation is explicitly left out. VC7 has a problem with it. So, implement an empty function and all should be fine. This applies to the assignment operator too. I realized as soon as I posted that commenting wouldn't be a good idea since the functions are declared as private, that functionality would be broken...
    Code:
    // XMemory.hpp line 143-4 in 2.3.0. Change to the following...
    XMemory( const XMemory &) {}
    XMemory & operator = (const XMemory &) { return *this; }
    The issue is with Microsoft's code optimization, if you use it, it needs the ctors to be defined which is contrary to the c++ standard.

IMN logo majestic logo threadwatch logo seochat tools logo