Board index » cppbuilder » Unable to open file 'OXMLDOM.OBJ'

Unable to open file 'OXMLDOM.OBJ'


2004-12-03 07:22:20 PM
cppbuilder111
I have the following:
#include <xmlcomponent.hpp>
#include <XMLDoc.hpp>
#include <oxmldom.hpp>
_di_IXMLDocument Doc = LoadXMLDocument(fName);
if (Doc->IsEmptyDoc()){//file exists but its empty
//return --- error
}
_di_IXMLNode Root = Doc->DocumentElement;
if( Root )
{
if(Root->GetNodeName().operator =("TS"))
{
//do sth.
}
//do sth.
}
When I compile, I get the following error, although oxmldom.hpp is
in include/vcl.
[Linker Fatal Error]Fatal: Unable to open file 'OXMLDOM.OBJ'
How can I do to get this in order?
Regards,
Harp
 
 

Re:Unable to open file 'OXMLDOM.OBJ'

Harp wrote:
Quote
When I compile, I get the following error, although oxmldom.hpp is
in include/vcl.
[Linker Fatal Error]Fatal: Unable to open file 'OXMLDOM.OBJ
Those two are unrelated.
A header is just another source file. The fact that it shares the same
name as an OBJ is just a sensible convenience for humans. It tells us
that it is likely declaring things that that OBJ file exports.
Put another way:the presence or absence of a given header from a
project has no bearing on whether or not a given OBJ file exists or is
going to be generated.
Only the presence of .CPP or .C files in a project guarantee the
presence of an object file with the same name.
Have you added oxmldom.cpp (or .c) to your project? My guess is that
you haven't. If you have that file do so.
It's also possible for a header file to use "#pragma link" to specify
an object (or library) file to link in. Check if this is the case for
oxmldom.hpp. If it is then check the file path - perhaps you haven't
added the location of the .obj to your library path.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Unable to open file 'OXMLDOM.OBJ'

Thanks!
You guessed right, I do not have the file - I do only have oxmldom.dcu und
oxmldom.hpp.
I have been searching in the internet for the file, but to no avail.
Do you know where I could get it?
Regards,
harp
"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Harp wrote:

>When I compile, I get the following error, although oxmldom.hpp is
>in include/vcl.
>[Linker Fatal Error]Fatal: Unable to open file 'OXMLDOM.OBJ

Those two are unrelated.

A header is just another source file. The fact that it shares the same
name as an OBJ is just a sensible convenience for humans. It tells us
that it is likely declaring things that that OBJ file exports.

Put another way:the presence or absence of a given header from a
project has no bearing on whether or not a given OBJ file exists or is
going to be generated.

Only the presence of .CPP or .C files in a project guarantee the
presence of an object file with the same name.

Have you added oxmldom.cpp (or .c) to your project? My guess is that
you haven't. If you have that file do so.

It's also possible for a header file to use "#pragma link" to specify
an object (or library) file to link in. Check if this is the case for
oxmldom.hpp. If it is then check the file path - perhaps you haven't
added the location of the .obj to your library path.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

{smallsort}

Re:Unable to open file 'OXMLDOM.OBJ'

I just compiled it..., why I cannot say for sure...
One other problem I have is to be able to access the contents.
I have something like this:
di_IXMLNode Root = Doc->DocumentElement;
if( Root ){//was ok
if(Root->GetNodeName().operator =("TS")){//was ok
AnsiString tsName = Root->GetNodeValue();//I also used GetText(), it
threw an exception
int indexName = tsName.Pos("ID=");
//do sth.
}
//do sth.
}
"Harp" < XXXX@XXXXX.COM >wrote in message
Quote
Thanks!
You guessed right, I do not have the file - I do only have oxmldom.dcu und
oxmldom.hpp.
I have been searching in the internet for the file, but to no avail.
Do you know where I could get it?
Regards,
harp

"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Harp wrote:
>
>>When I compile, I get the following error, although oxmldom.hpp is
>>in include/vcl.
>>[Linker Fatal Error]Fatal: Unable to open file 'OXMLDOM.OBJ
>
>Those two are unrelated.
>
>A header is just another source file. The fact that it shares the same
>name as an OBJ is just a sensible convenience for humans. It tells us
>that it is likely declaring things that that OBJ file exports.
>
>Put another way:the presence or absence of a given header from a
>project has no bearing on whether or not a given OBJ file exists or is
>going to be generated.
>
>Only the presence of .CPP or .C files in a project guarantee the
>presence of an object file with the same name.
>
>Have you added oxmldom.cpp (or .c) to your project? My guess is that
>you haven't. If you have that file do so.
>
>It's also possible for a header file to use "#pragma link" to specify
>an object (or library) file to link in. Check if this is the case for
>oxmldom.hpp. If it is then check the file path - perhaps you haven't
>added the location of the .obj to your library path.
>--
>Andrue Cope [TeamB]
>[Bicester, Uk]
>info.borland.com/newsgroups/guide.html


 

Re:Unable to open file 'OXMLDOM.OBJ'

I did this
if(Root->GetNodeName().operator =("TS"))
{
if(Root->HasAttribute("ID"))
{
AnsiString tsName = Root->GetAttributeNS("ID","");
if(!tsName.IsEmpty() && tsName != "")
//do sth.
}
}
and "es funkt" ie it worked.
Thanks,
Harp
"Harp" < XXXX@XXXXX.COM >wrote in message
Quote
I just compiled it..., why I cannot say for sure...
One other problem I have is to be able to access the contents.
I have something like this:

di_IXMLNode Root = Doc->DocumentElement;
if( Root ){//was ok
if(Root->GetNodeName().operator =("TS")){//was ok
AnsiString tsName = Root->GetNodeValue();//I also used GetText(),
it
threw an exception
int indexName = tsName.Pos("ID=");
//do sth.
}
//do sth.
}

"Harp" < XXXX@XXXXX.COM >wrote in message
news:41b05d99$ XXXX@XXXXX.COM ...
>Thanks!
>You guessed right, I do not have the file - I do only have oxmldom.dcu
und
>oxmldom.hpp.
>I have been searching in the internet for the file, but to no avail.
>Do you know where I could get it?
>Regards,
>harp
>
>"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>Harp wrote:
>>
>>>When I compile, I get the following error, although oxmldom.hpp is
>>>in include/vcl.
>>>[Linker Fatal Error]Fatal: Unable to open file 'OXMLDOM.OBJ
>>
>>Those two are unrelated.
>>
>>A header is just another source file. The fact that it shares the same
>>name as an OBJ is just a sensible convenience for humans. It tells us
>>that it is likely declaring things that that OBJ file exports.
>>
>>Put another way:the presence or absence of a given header from a
>>project has no bearing on whether or not a given OBJ file exists or is
>>going to be generated.
>>
>>Only the presence of .CPP or .C files in a project guarantee the
>>presence of an object file with the same name.
>>
>>Have you added oxmldom.cpp (or .c) to your project? My guess is that
>>you haven't. If you have that file do so.
>>
>>It's also possible for a header file to use "#pragma link" to specify
>>an object (or library) file to link in. Check if this is the case for
>>oxmldom.hpp. If it is then check the file path - perhaps you haven't
>>added the location of the .obj to your library path.
>>--
>>Andrue Cope [TeamB]
>>[Bicester, Uk]
>>info.borland.com/newsgroups/guide.html
>
>


 

Re:Unable to open file 'OXMLDOM.OBJ'

Harp wrote:
Quote
You guessed right, I do not have the file - I do only have
oxmldom.dcu und oxmldom.hpp.
a dcu is the Delphi equivalent of an OBJ. Builder should be able to use
them anyway. Unfortunately I haven't needed to do that so I'm not sure
you go about it.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Unable to open file 'OXMLDOM.OBJ'

Harp wrote:
Quote
if(Root->GetNodeName().operator =("TS")){//was ok
Huh? That doesn't look right.
You have a single "=" which looks like it ought to be a double "==".
Also the use of ".operator" is a bit unusual - are you sure need it?
According to the help GetNodeName() is declared as:
virtual DOMString __fastcall GetNodeName(void) = 0;
Where "DOMString__" is a typedef for WideString. Assigning to the
returned result is therefore a waste of time. It will also cause the
"if" to always evaluate to true.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Unable to open file 'OXMLDOM.OBJ'

"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Harp wrote:

>if(Root->GetNodeName().operator =("TS")){//was ok

Huh? That doesn't look right.

You have a single "=" which looks like it ought to be a double "==".
Also the use of ".operator" is a bit unusual - are you sure need it?

According to the help GetNodeName() is declared as:

virtual DOMString __fastcall GetNodeName(void) = 0;

Where "DOMString__" is a typedef for WideString. Assigning to the
returned result is therefore a waste of time. It will also cause the
"if" to always evaluate to true.
I just used code-Insight and it directed me to that... I was also surprised
that it worked...
if(Root->GetNodeName().operator =("TS")){//was ok
Hmmmm... I do not know...
but it accepted it...
regards,
harp
 

Re:Unable to open file 'OXMLDOM.OBJ'

Harp wrote:
Quote
Hmmmm... I do not know... but it accepted it...
Sometimes that's all you need to know. I developed a lot of software by
just working out how to shut the damn' compiler up :)
There is a /danger/ in programming that way that you will produce
incomprehensible code. If you don't understand something isolate the
code. That way you keep 'dirty' code separate from known good code.
I'm a pragmatist. If something works sufficient for the requirements
then leave it be. Of course the requirements might one day become
"write source like a C++ guru" as ours gradually did. In recent years
I've tried to get to better grips with the language and understand
/why/ certain constructs are valid and/or work. I'm getting a lot
better at it but I still have gaps in my knowledge.
It's well worth the extra effort but not essential IMO. What really
matters is the EXE and the cheque from your client :)
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html