Hello Jonathan,
I made a mistake, in fact, the libxml is housed in the LIB rather than
DLL.
Cheers!
Hai wang
"hai wang" <hwang@accuris.ie> wrote:
>
>Hello Jonathan,
> The libxml is housed in the DLL, I tried to call several other functions
>in the library, no one works, so I guess my library setting has some problems,
>but where?
>
>Thank you very much!
>Hai wang
>"Jonathan Morrison" <jonathanm@mindspring.com> wrote:
>>Hai,
>>The linker error you are getting means that the linker is looking for a
>>function written in C named xmlParseFile. The reason that the error message
>>says _xmlParseFile is because the compiler mangles the name of C functions
>>this way. Where is the libxml library housed (a DLL or LIB).
>>
>>-Jonathan
>>"hai wang" <hwang@accuris.ie> wrote in message
>>news:3a1436ca$1@news.devx.com...
>>>
>>> Hello everybody,
>>> Now I am working with a xml c libray called libxml, I have compiled
>>> the library by using VC++ 6, and then I wrote my own application which

>is
>>> calling the xml c library functions, I can compile the application without
>>> any error, but I couldn't create an executable file because a linker

error
>>> "error LNK2001: unresolved external symbol _xmlParseFile", I guess the

>>problem
>>> may result from VC++ settings which make VC++ co-work with c source code,
>>> but I don't know how to fix the problem, if any of you has the experience
>>> or solution, could you please reply me, I really appreciate it.
>>>
>>> Thank you very much!
>>>
>>> Hai Wang
>>>
>>>
>>> The source codes are given which caused the problem:
>>>
>>> char* filename = "Wang"; // substitute it with the file name
>>>
>>> FILE* f =fopen(filename, "w");
>>> f=fopen(filename, "w");
>>> int res, size = 1024;
>>> char chars[1024];
>>> res = fread(chars,1, 1024, f);
>>>
>>> SYSTEMTIME sysTime;
>>> COleDateTime timeNow = COleDateTime::GetCurrentTime();
>>>
>>>
>>> WORD W_starttime, W_endtime = 0;
>>>
>>> if(!timeNow.GetAsSystemTime(sysTime))
>>> {
>>> // cout << "time format conversion is failed " << endl;
>>> exit(1);
>>> }
>>>
>>> W_starttime = sysTime.wMilliseconds;
>>>
>>> xmlDocPtr xml_xmlDocPtr;
>>>
>>>
>>> for(int iterator1 = 0; iterator1 < 1000; iterator1++)
>>> {
>>> xml_xmlDocPtr = xmlParseMemory(chars, res); // attention! the

>>function
>>> call caused this problem
>>> }

>>
>>

>