Getting some error while using make file...
-
Hi, I have written some program in VS6.0, to parse an XML file, CoInitialize(NULL); CComPtr spXMLDOM; CComPtr spXMLNode; IXMLDOMAttribute *pIXMLDOMAttribute = NULL; IXMLDOMElement *pIXMLDOMElement = NULL; HRESULT hr = spXMLDOM.CoCreateInstance(__uuidof(DOMDocument)); VARIANT_BOOL bSuccess = false; USES_CONVERSION; _variant_t fileNameValue=T2W(RegFile); FILE *fp=fopen(RegFile,"r"); if(fp && !(spXMLDOM->load(fileNameValue,&bSuccess))) { hr = spXMLDOM->get_documentElement(&pIXMLDOMElement); _variant_t nameValue; if(!hr && !(pIXMLDOMElement->getAttribute(CComBSTR(L"source- name"),&nameValue))) { if ( nameValue.vt == VT_BSTR ) { USES_CONVERSION; sourceName = W2T(nameValue.bstrVal); } } spXMLDOM.Release(); // Stop COM CoUninitialize(); For this i have installed Microsoft SDK, and i am setting the path of this in Tools->Options->Directories... It builds correctly from the workspace, but if i try to build from make file using "NMAKE /f "Test.mak" CFG="Test - Win32 Release", It gives many errors, some are:: cl.exe @C:\DOCUME~1\chikkall\LOCALS~1\Temp\nma03112. DCRegistry.cpp DCRegistry.cpp(386) : error C2065: 'IXMLDOMDocument' : undeclared identifier DCRegistry.cpp(386) : error C2955: 'CComPtr' : use of class template requires template argu ment list C:\PROGRA~1\MICROS~3\VC98\ATL\INCLUDE\atlbase.h(563) : see declaration of 'CComPtr' DCRegistry.cpp(386) : error C2133: 'spXMLDOM' : unknown size DCRegistry.cpp(386) : error C2512: 'CComPtr' : no appropriate default constructor available DCRegistry.cpp(386) : error C2262: 'spXMLDOM' : cannot be destroyed DCRegistry.cpp(387) : error C2065: 'IXMLDOMNode' : undeclared identifier DCRegistry.cpp(387) : error C2955: 'CComPtr' : use of class template requires template argu These errors indicate me that Microsoft SDK directory is not getting linked for building, how to make SDK directory available for build in mak file ????
-
Hi, I have written some program in VS6.0, to parse an XML file, CoInitialize(NULL); CComPtr spXMLDOM; CComPtr spXMLNode; IXMLDOMAttribute *pIXMLDOMAttribute = NULL; IXMLDOMElement *pIXMLDOMElement = NULL; HRESULT hr = spXMLDOM.CoCreateInstance(__uuidof(DOMDocument)); VARIANT_BOOL bSuccess = false; USES_CONVERSION; _variant_t fileNameValue=T2W(RegFile); FILE *fp=fopen(RegFile,"r"); if(fp && !(spXMLDOM->load(fileNameValue,&bSuccess))) { hr = spXMLDOM->get_documentElement(&pIXMLDOMElement); _variant_t nameValue; if(!hr && !(pIXMLDOMElement->getAttribute(CComBSTR(L"source- name"),&nameValue))) { if ( nameValue.vt == VT_BSTR ) { USES_CONVERSION; sourceName = W2T(nameValue.bstrVal); } } spXMLDOM.Release(); // Stop COM CoUninitialize(); For this i have installed Microsoft SDK, and i am setting the path of this in Tools->Options->Directories... It builds correctly from the workspace, but if i try to build from make file using "NMAKE /f "Test.mak" CFG="Test - Win32 Release", It gives many errors, some are:: cl.exe @C:\DOCUME~1\chikkall\LOCALS~1\Temp\nma03112. DCRegistry.cpp DCRegistry.cpp(386) : error C2065: 'IXMLDOMDocument' : undeclared identifier DCRegistry.cpp(386) : error C2955: 'CComPtr' : use of class template requires template argu ment list C:\PROGRA~1\MICROS~3\VC98\ATL\INCLUDE\atlbase.h(563) : see declaration of 'CComPtr' DCRegistry.cpp(386) : error C2133: 'spXMLDOM' : unknown size DCRegistry.cpp(386) : error C2512: 'CComPtr' : no appropriate default constructor available DCRegistry.cpp(386) : error C2262: 'spXMLDOM' : cannot be destroyed DCRegistry.cpp(387) : error C2065: 'IXMLDOMNode' : undeclared identifier DCRegistry.cpp(387) : error C2955: 'CComPtr' : use of class template requires template argu These errors indicate me that Microsoft SDK directory is not getting linked for building, how to make SDK directory available for build in mak file ????
One way of doing this is to move the location where you tell the Workspace about the Include directory from Tools->Options->Directories to Project Settings C/C++(tab) Category:Preprocessor Additional include Directories (dont forget to also add the library path to Project Settings Link(tab) Category:Input Additional Library Path) and then save the workspace and Export Makefile. This will add the neccessary directory paths to the .MAK file. The other way is to change the environment variables INCLUDE and LIB that VCVARS32.BAT sets up.
-
One way of doing this is to move the location where you tell the Workspace about the Include directory from Tools->Options->Directories to Project Settings C/C++(tab) Category:Preprocessor Additional include Directories (dont forget to also add the library path to Project Settings Link(tab) Category:Input Additional Library Path) and then save the workspace and Export Makefile. This will add the neccessary directory paths to the .MAK file. The other way is to change the environment variables INCLUDE and LIB that VCVARS32.BAT sets up.