05-10-2010 05:30 PM
I'm trying to link a program written in CVI into MSVC9, that uses the CVIXML.FP Instrument. I've added the path to toolslib\activex\excel\*.*, and used "toolslib\activex\excel\msvc\excel2000.obj" in my project. However, during link, I am getting (unresolved external symbol) errors for these ActiveX components. I cannot find what I need to link into my MSVC9 project to remove this link error.
I tried loading excel2000.c, excelreport.c, but I get the same error. I loaded toolslib\toolbox\CVIXML.C to my project. Is there a file that I am missing?
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentload@28 referenced in function _CVIXMLLoadDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentSetpreserveWhiteSpace@12 referenced in function _CVIXMLLoadDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentSetasync@12 referenced in function _CVIXMLLoadDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_NewDOMDocumentIXMLDOMDocument@20 referenced in function _CVIXMLLoadDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentSetByRefdocumentElement@12 referenced in function _CVIXMLNewDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentappendChild@16 referenced in function _CVIXMLNewDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentcreateProcessingInstruction@20 referenced in function _CVIXMLNewDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentcreateElement@16 referenced in function _CVIXMLNewDocument@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentsave@24 referenced in function _CVIXMLSaveDocument@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentGetdocumentElement@12 referenced in function _CVIXMLGetRootElement@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeinsertBefore@32 referenced in function _CVIXMLNewElement@16
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeappendChild@16 referenced in function _CVIXMLNewElement@16
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetfirstChild@12 referenced in function _CVIXMLSetElementValue@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentcreateTextNode@16 referenced in function _CVIXMLSetElementValue@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeSetnodeTypedValue@24 referenced in function _CVIXMLSetElementValue@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMElementGetnodeName@12 referenced in function _CVIXMLGetElementTagLength@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetnodeTypedValue@12 referenced in function _CVIXMLGetElementValueLength@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodehasChildNodes@12 referenced in function _CVIXMLGetElementValueLength@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodecloneNode@16 referenced in function _CVIXMLCopyElement@20
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeListnextNode@12 referenced in function _CVIXMLFindElements@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMElementgetElementsByTagName@16 referenced in function _CVIXMLFindElements@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNoderemoveChild@16 referenced in function _CVIXMLRemoveElement@4
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetnodeType@12 referenced in function _CVIXMLRemoveElement@4
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetparentNode@12 referenced in function _CVIXMLRemoveElement@4
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetnodeName@12 referenced in function _CVIXMLGetChildElementByTag@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetchildNodes@12 referenced in function _CVIXMLGetChildElementByTag@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetnextSibling@12 referenced in function _CVIXMLGetNextElement@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetpreviousSibling@12 referenced in function _CVIXMLGetPreviousElement@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNamedNodeMapGetlength@12 referenced in function _CVIXMLGetNumAttributes@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNodeGetattributes@12 referenced in function _CVIXMLGetNumAttributes@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNamedNodeMapGetitem@16 referenced in function _CVIXMLGetAttributeByIndex@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMNamedNodeMapgetNamedItem@16 referenced in function _CVIXMLGetAttributeByName@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMElementsetAttributeNode@16 referenced in function _CVIXMLAddAttribute@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMAttributeSetvalue@24 referenced in function _CVIXMLAddAttribute@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMDocumentcreateAttribute@16 referenced in function _CVIXMLAddAttribute@12
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMAttributeGetname@12 referenced in function _CVIXMLGetAttributeNameLength@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMAttributeGetnodeValue@12 referenced in function _CVIXMLGetAttributeValueLength@8
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMElementremoveAttributeNode@16 referenced in function _CVIXMLRemoveAttribute@4
1>cvixml.obj : error LNK2019: unresolved external symbol _MSXML_IXMLDOMAttributeGetnodeName@12 referenced in function _GetAttributeIndex
05-10-2010 11:53 PM
Why do you load the .c files into your project ? CVI style is to load the .fp files into the project. The .fp file also includes information for the linker what to link. According to the error messages it seems for me that linking to the msxml library is missing.
05-11-2010 03:01 PM
Projects under CVI IDE uses *.FP files in the project, or loads the instrument directly. The CVI DLL works fine, its the MSVC 2005 project (porting CVI code) that causes that error listing. Sorry for the confusion.
MSVC 2008/2005 compiler cannot understand the *.FP format, so it uses either an *.OBJ or the *.c file directly.
05-12-2010 11:26 AM
.FP files can declare dependencies on other .FP files. If you open cvixml.fp in the function tree editor and you browse to Edit>>.FP Auto-Load List, you'll see the list of other .FP files that this .FP file depends on. (And of course those .FP files might in turn depend on other ones). When you load an .FP file in CVI, CVI automatically loads these other instruments as well. But for your MSVC project you need to add these manually. In your case, you're missing msxmldom.c (or msxmldom.obj).
Luis
05-12-2010 02:43 PM
I'm sorry, I guess the problem I am trying to solve is how to use the CVIXML.C file under Microsoft Visual Studio 9 (2008). I think it is using an ActiveX component that I am missing (something the CVIXML.FP is doing, but inside the instrument driver directly).
When I add the CVIXML.C file to my (myApp.vcproj) project file, it compiles fine, but the linker complains, missing the required ActiveX component. What is that component, and where can I get it?
I see this download from Microsoft site, but why does my CVI app work, if this component is already loaded in my machine, but MSVC9 does not?
05-13-2010 10:41 AM
Yes, I think I understand your problem. The solution I gave you (maybe not as directly as I should have) was to add the file msxmldom.c, which you can find in the same folder as cvixml.c, to your Visual Studio project.
Luis
05-14-2010 08:20 AM