The memory deallocation problem sounds like a question of mixed runtimes. See http://xml.apache.org/xerces-c/faq-build.html#faq-13.
 
I'm afraid I can't comment on the correct build procedure when using the MSVC IDE; we build all our code on the command line with our own system of makefiles. Anyone else got any insight?


From: harish suvarna [mailto:[EMAIL PROTECTED]
Sent: Monday, March 21, 2005 12:20 PM
To: security-dev@xml.apache.org
Subject: RE: building c++ xsec1.1

By commenting the #define XSEC_NO_XALAN  line, I  build  the debug version. Then I am trying to execute the simpleHmac, simpleDecrypt programs. I am getting the crash.
The debugger shows it crashes in xsecdomutils.cpp while deleting the array of chars. But another overloadedversion of strEquals()(code below) in the same file frees using delete (not delete []).
I am looking into this. But before this I want to make sure that what I am doing is right. That is
 
a)build xsec and samples with VC++7.1
b) No linker option changes (take as it is I get from the solution file provided).
c) Just add appropriate xereces/xalan include/library paths using tools->options in dev studio.
d) the xerces/xalan are versions 2.5/1.7 repectively which are built with VC++ 6.0.
 
I am thinking that I have some setup wrong somewhere as most of the guys in the xsec dev forum are happily using the library. I really appreciate all help and thank you sincerely. My end goal is to use the library with xpath. Because that is where the power is.

bool strEquals (const XMLCh * str1, const char * str2) {
bool ret;
XMLCh * str2XMLCh = XMLString::transcode(str2);
if (str2XMLCh != NULL) {
ret = (XMLString::compareString(str1, str2XMLCh) == 0);
delete [] str2XMLCh;
}......
 
-Harish


Jesse Pelton <[EMAIL PROTECTED]> wrote:
Assuming you're successfully linking against the Xalan library, the only other thing I can see is that there might be a namespace issue. XSec appears to be expecting Xalan to use the xalanc_1_7 namespace. If Xalan is using a different namespace (or none at all), the linker won't be able to resolve the symbols. I'd confirm that the linker is locating the Xalan library before looking into this, though.


From: harish suvarna [mailto:[EMAIL PROTECTED]
Sent: Friday, March 18, 2005 6:21 PM
To: security-dev@xml.apache.org
Subject: RE: building c++ xsec1.1

I did build xalan1.7 but of no use. I keep getting the link errors. I removed the comment for
#define XSEC_NO_XALAN . Then it could buid fine.
-Harish


Jesse Pelton <[EMAIL PROTECTED]> wrote:
Sorry, I shouldn't have said you need to build Xalan, just that you need to have it (libraries and headers) to use XPath. Xerces is a requirement to use XSec at all, but again, you should be able to use prebuilt binaries.


From: harish suvarna [mailto:[EMAIL PROTECTED]
Sent: Friday, March 18, 2005 11:23 AM
To: security-dev@xml.apache.org
Subject: RE: building c++ xsec1.1

Thank you Jesse for the help.
I downloaded the xalan1.7 from an archive of apache. It already had the built executables and
libs. I am using them. I did not build xalan. But the source and project files are there. But the project files are based on VC6. I will build in VC++7 and see. Initially I started with xalan1.9 and xerces2.6. I got lot of errors. Then I saw the notes that xsec needs xalan1.7 and xerces2.5. Do I need xerces building too? I will know after building xalan1.7.
 
-Harish
 


Jesse Pelton <[EMAIL PROTECTED]> wrote:
Did you build and link Xalan or define XSEC_NO_XALAN in XSEC32Config.hpp? You'll need to build Xalan if you require XPath support, otherwise you can tell XSec to build without it.


From: harish suvarna [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 17, 2005 7:32 PM
To: security-dev@xml.apache.org
Subject: building c++ xsec1.1

Hi,
I am trying to build the c++ version of xml security suite. I downloaded the xsec 1.1 and also xerces2.5 and xalan1.7. I am trying to build it using vcc+7.1 (.net 2003). I get link errors.
Any info on this. Thank you very much.
 
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XalanDOMString::~XalanDOMString(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XalanDOMString::XalanDOMString(char const *,unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z)
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XalanDOMString::XalanDOMString(class xalanc_1_7::XalanDOMString const &,unsigned int,unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED])
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XalanDOMString::XalanDOMString(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XercesDOMSupport::XercesDOMSupport(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XercesWrapperNavigator::XercesWrapperNavigator(class xalanc_1_7::XercesDocumentWrapper *)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@1@@Z)
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XObjectPtr::~XObjectPtr(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
xsec_lib error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall xalanc_1_7::XPathConstructionContextDefault::XPathConstructionContextDefault(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])

-harish

Reply via email to