You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Sanat Talmaki <sa...@gmail.com> on 2010/01/29 01:55:14 UTC

Linking Error

Hello everybody,
I am Sanat.

I just downloaded the xerces source code and tried to build it. The build
succeeded, but when I tried the sample of code in the programming section, I
got the following errors. I am using Visual Studio 2008 and my OS is Vista
64 bit:

1>Linking...
1>main.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Terminate(void)"
(__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
function __catch$_main$0
1>main.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils
@xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced in
function _main
1>main.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static char const * const
xercesc_3_0::XMLUni::fgXercescDefaultLocale"
(__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
1>C:\Users\Sanat\Desktop\CEM_Res\Jan
2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3 unresolved
externals
1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
2010\xercesParser\Debug\BuildLog.htm"
1>xercesParser - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I feel I am not linking the library or something like that. But I added the
entire xerces folder in my project properties under linker in visual studio.

Any help would be fantastic. I am just starting out using xerces so please
forgive me if my error is too dumbed out.

Thanks,

Sincerely,

Sanat.

Re: Linking Error

Posted by Sanat Talmaki <sa...@gmail.com>.
Hi Kun,

Thanks for the advice. I used the binary version and was able to run the
initial sample code.

Is there a tutorial out there that a newbie can refer to ? Or do you just
look in the api and start from there itself?

Thanks.

On Thu, Jan 28, 2010 at 9:31 PM, Kun Niu <ha...@gmail.com> wrote:

> Sanat Talmaki wrote:
>
>> Ok, so the way I understood it was that the binary could be used only if
>> the
>> specifications for the binary matched my own OS/IDE specs. And if it
>> didn't
>> then I would need to download the source and build.
>> But:
>> 1) I am still not sure what the exact difference between using the binary
>> and source is.
>>
>>
> No much difference. The binary distro just saves you the time to compile
> the source.
>
>  2) If I download the binary, I can use it directly to build my custom
>> applications ?
>>
>>
> Definitely yes.
>
>  Thanks,
>> Sanat.
>>
>> On Thu, Jan 28, 2010 at 8:15 PM, Kun Niu <ha...@gmail.com> wrote:
>>
>>
>>
>>> Where did you download your present development library package?
>>> Have you tried the binary distribution downloaded from the following
>>> link?
>>> http://xerces.apache.org/xerces-c/download.cgi
>>>
>>> Sanat Talmaki wrote:
>>>
>>>
>>>
>>>> the documentation says link it to the xerces-c_3.lib. But I couldn't
>>>> find
>>>> where exactly this file might be located.
>>>> I am using the Visual Studio 2008 IDE.
>>>>
>>>> Thanks,
>>>> Sanat.
>>>>
>>>> On Thu, Jan 28, 2010 at 8:03 PM, Kun Niu <ha...@gmail.com> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> You should also specify which library to link I think.
>>>>> Which IDE are you using?
>>>>>
>>>>> Sanat Talmaki wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Btw, I am sorry for forgetting to attach my code in my previous mail.
>>>>>> Here
>>>>>> is my code:
>>>>>>
>>>>>> #include <xercesc/util/PlatformUtils.hpp>
>>>>>> // Other include files, declarations, and non-Xerces-C++
>>>>>> initializations.
>>>>>> #include <iostream>
>>>>>> //#include <conio.h>
>>>>>>
>>>>>>
>>>>>> using namespace xercesc;
>>>>>>
>>>>>> int main(int argc, char* argv[])
>>>>>> {
>>>>>>  try {
>>>>>>  XMLPlatformUtils::Initialize();
>>>>>>  }
>>>>>>  catch (const XMLException& toCatch) {
>>>>>>  // Do your failure processing here
>>>>>>  return 1;
>>>>>>  }
>>>>>>
>>>>>>  // Do your actual work with Xerces-C++ here.
>>>>>>
>>>>>>  XMLPlatformUtils::Terminate();
>>>>>>
>>>>>>  // Other terminations and cleanup.
>>>>>>  return 0;
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Sanat.
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <
>>>>>> sanat.schumi@gmail.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hello everybody,
>>>>>>> I am Sanat.
>>>>>>>
>>>>>>> I just downloaded the xerces source code and tried to build it. The
>>>>>>> build
>>>>>>> succeeded, but when I tried the sample of code in the programming
>>>>>>> section, I
>>>>>>> got the following errors. I am using Visual Studio 2008 and my OS is
>>>>>>> Vista
>>>>>>> 64 bit:
>>>>>>>
>>>>>>> 1>Linking...
>>>>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>>>>> "__declspec(dllimport) public: static void __cdecl
>>>>>>> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
>>>>>>> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
>>>>>>> function __catch$_main$0
>>>>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>>>>> "__declspec(dllimport) public: static void __cdecl
>>>>>>> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char
>>>>>>> const
>>>>>>> *
>>>>>>> const,class xercesc_3_0::PanicHandler * const,class
>>>>>>> xercesc_3_0::MemoryManager * const)"
>>>>>>> (__imp_?Initialize@XMLPlatformUtils
>>>>>>> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z)
>>>>>>> referenced
>>>>>>> in function _main
>>>>>>> 1>main.obj : error LNK2001: unresolved external symbol
>>>>>>> "__declspec(dllimport) public: static char const * const
>>>>>>> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
>>>>>>> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
>>>>>>> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
>>>>>>> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3
>>>>>>> unresolved
>>>>>>> externals
>>>>>>> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
>>>>>>> 2010\xercesParser\Debug\BuildLog.htm"
>>>>>>> 1>xercesParser - 4 error(s), 0 warning(s)
>>>>>>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>>>>>>> ==========
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>>>>> I feel I am not linking the library or something like that. But I
>>>>>>> added
>>>>>>> the
>>>>>>> entire xerces folder in my project properties under linker in visual
>>>>>>> studio.
>>>>>>>
>>>>>>> Any help would be fantastic. I am just starting out using xerces so
>>>>>>> please
>>>>>>> forgive me if my error is too dumbed out.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Sincerely,
>>>>>>>
>>>>>>> Sanat.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>

Re: Linking Error

Posted by Kun Niu <ha...@gmail.com>.
Sanat Talmaki wrote:
> Ok, so the way I understood it was that the binary could be used only if the
> specifications for the binary matched my own OS/IDE specs. And if it didn't
> then I would need to download the source and build.
> But:
> 1) I am still not sure what the exact difference between using the binary
> and source is.
>   
No much difference. The binary distro just saves you the time to compile 
the source.
> 2) If I download the binary, I can use it directly to build my custom
> applications ?
>   
Definitely yes.
> Thanks,
> Sanat.
>
> On Thu, Jan 28, 2010 at 8:15 PM, Kun Niu <ha...@gmail.com> wrote:
>
>   
>> Where did you download your present development library package?
>> Have you tried the binary distribution downloaded from the following link?
>> http://xerces.apache.org/xerces-c/download.cgi
>>
>> Sanat Talmaki wrote:
>>
>>     
>>> the documentation says link it to the xerces-c_3.lib. But I couldn't find
>>> where exactly this file might be located.
>>> I am using the Visual Studio 2008 IDE.
>>>
>>> Thanks,
>>> Sanat.
>>>
>>> On Thu, Jan 28, 2010 at 8:03 PM, Kun Niu <ha...@gmail.com> wrote:
>>>
>>>
>>>
>>>       
>>>> You should also specify which library to link I think.
>>>> Which IDE are you using?
>>>>
>>>> Sanat Talmaki wrote:
>>>>
>>>>
>>>>
>>>>         
>>>>> Btw, I am sorry for forgetting to attach my code in my previous mail.
>>>>> Here
>>>>> is my code:
>>>>>
>>>>> #include <xercesc/util/PlatformUtils.hpp>
>>>>> // Other include files, declarations, and non-Xerces-C++
>>>>> initializations.
>>>>> #include <iostream>
>>>>> //#include <conio.h>
>>>>>
>>>>>
>>>>> using namespace xercesc;
>>>>>
>>>>> int main(int argc, char* argv[])
>>>>> {
>>>>>  try {
>>>>>   XMLPlatformUtils::Initialize();
>>>>>  }
>>>>>  catch (const XMLException& toCatch) {
>>>>>   // Do your failure processing here
>>>>>   return 1;
>>>>>  }
>>>>>
>>>>>  // Do your actual work with Xerces-C++ here.
>>>>>
>>>>>  XMLPlatformUtils::Terminate();
>>>>>
>>>>>  // Other terminations and cleanup.
>>>>>  return 0;
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Sanat.
>>>>>
>>>>>
>>>>> On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <sanat.schumi@gmail.com
>>>>>
>>>>>
>>>>>           
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>
>>>>>           
>>>>>> Hello everybody,
>>>>>> I am Sanat.
>>>>>>
>>>>>> I just downloaded the xerces source code and tried to build it. The
>>>>>> build
>>>>>> succeeded, but when I tried the sample of code in the programming
>>>>>> section, I
>>>>>> got the following errors. I am using Visual Studio 2008 and my OS is
>>>>>> Vista
>>>>>> 64 bit:
>>>>>>
>>>>>> 1>Linking...
>>>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>>>> "__declspec(dllimport) public: static void __cdecl
>>>>>> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
>>>>>> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
>>>>>> function __catch$_main$0
>>>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>>>> "__declspec(dllimport) public: static void __cdecl
>>>>>> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const
>>>>>> *
>>>>>> const,class xercesc_3_0::PanicHandler * const,class
>>>>>> xercesc_3_0::MemoryManager * const)"
>>>>>> (__imp_?Initialize@XMLPlatformUtils
>>>>>> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z)
>>>>>> referenced
>>>>>> in function _main
>>>>>> 1>main.obj : error LNK2001: unresolved external symbol
>>>>>> "__declspec(dllimport) public: static char const * const
>>>>>> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
>>>>>> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
>>>>>> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
>>>>>> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3
>>>>>> unresolved
>>>>>> externals
>>>>>> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
>>>>>> 2010\xercesParser\Debug\BuildLog.htm"
>>>>>> 1>xercesParser - 4 error(s), 0 warning(s)
>>>>>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>>>>>> ==========
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>>>> I feel I am not linking the library or something like that. But I added
>>>>>> the
>>>>>> entire xerces folder in my project properties under linker in visual
>>>>>> studio.
>>>>>>
>>>>>> Any help would be fantastic. I am just starting out using xerces so
>>>>>> please
>>>>>> forgive me if my error is too dumbed out.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Sincerely,
>>>>>>
>>>>>> Sanat.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>
>>>>>           
>>>>         
>>>
>>>       
>>     
>
>   


Re: Linking Error

Posted by Sanat Talmaki <sa...@gmail.com>.
Ok, so the way I understood it was that the binary could be used only if the
specifications for the binary matched my own OS/IDE specs. And if it didn't
then I would need to download the source and build.
But:
1) I am still not sure what the exact difference between using the binary
and source is.
2) If I download the binary, I can use it directly to build my custom
applications ?

Thanks,
Sanat.

On Thu, Jan 28, 2010 at 8:15 PM, Kun Niu <ha...@gmail.com> wrote:

> Where did you download your present development library package?
> Have you tried the binary distribution downloaded from the following link?
> http://xerces.apache.org/xerces-c/download.cgi
>
> Sanat Talmaki wrote:
>
>> the documentation says link it to the xerces-c_3.lib. But I couldn't find
>> where exactly this file might be located.
>> I am using the Visual Studio 2008 IDE.
>>
>> Thanks,
>> Sanat.
>>
>> On Thu, Jan 28, 2010 at 8:03 PM, Kun Niu <ha...@gmail.com> wrote:
>>
>>
>>
>>> You should also specify which library to link I think.
>>> Which IDE are you using?
>>>
>>> Sanat Talmaki wrote:
>>>
>>>
>>>
>>>> Btw, I am sorry for forgetting to attach my code in my previous mail.
>>>> Here
>>>> is my code:
>>>>
>>>> #include <xercesc/util/PlatformUtils.hpp>
>>>> // Other include files, declarations, and non-Xerces-C++
>>>> initializations.
>>>> #include <iostream>
>>>> //#include <conio.h>
>>>>
>>>>
>>>> using namespace xercesc;
>>>>
>>>> int main(int argc, char* argv[])
>>>> {
>>>>  try {
>>>>   XMLPlatformUtils::Initialize();
>>>>  }
>>>>  catch (const XMLException& toCatch) {
>>>>   // Do your failure processing here
>>>>   return 1;
>>>>  }
>>>>
>>>>  // Do your actual work with Xerces-C++ here.
>>>>
>>>>  XMLPlatformUtils::Terminate();
>>>>
>>>>  // Other terminations and cleanup.
>>>>  return 0;
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Sanat.
>>>>
>>>>
>>>> On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <sanat.schumi@gmail.com
>>>>
>>>>
>>>>> wrote:
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>> Hello everybody,
>>>>> I am Sanat.
>>>>>
>>>>> I just downloaded the xerces source code and tried to build it. The
>>>>> build
>>>>> succeeded, but when I tried the sample of code in the programming
>>>>> section, I
>>>>> got the following errors. I am using Visual Studio 2008 and my OS is
>>>>> Vista
>>>>> 64 bit:
>>>>>
>>>>> 1>Linking...
>>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>>> "__declspec(dllimport) public: static void __cdecl
>>>>> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
>>>>> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
>>>>> function __catch$_main$0
>>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>>> "__declspec(dllimport) public: static void __cdecl
>>>>> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const
>>>>> *
>>>>> const,class xercesc_3_0::PanicHandler * const,class
>>>>> xercesc_3_0::MemoryManager * const)"
>>>>> (__imp_?Initialize@XMLPlatformUtils
>>>>> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z)
>>>>> referenced
>>>>> in function _main
>>>>> 1>main.obj : error LNK2001: unresolved external symbol
>>>>> "__declspec(dllimport) public: static char const * const
>>>>> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
>>>>> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
>>>>> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
>>>>> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3
>>>>> unresolved
>>>>> externals
>>>>> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
>>>>> 2010\xercesParser\Debug\BuildLog.htm"
>>>>> 1>xercesParser - 4 error(s), 0 warning(s)
>>>>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>>>>> ==========
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>>> I feel I am not linking the library or something like that. But I added
>>>>> the
>>>>> entire xerces folder in my project properties under linker in visual
>>>>> studio.
>>>>>
>>>>> Any help would be fantastic. I am just starting out using xerces so
>>>>> please
>>>>> forgive me if my error is too dumbed out.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Sanat.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>

Re: Linking Error

Posted by Kun Niu <ha...@gmail.com>.
Where did you download your present development library package?
Have you tried the binary distribution downloaded from the following link?
http://xerces.apache.org/xerces-c/download.cgi
Sanat Talmaki wrote:
> the documentation says link it to the xerces-c_3.lib. But I couldn't find
> where exactly this file might be located.
> I am using the Visual Studio 2008 IDE.
>
> Thanks,
> Sanat.
>
> On Thu, Jan 28, 2010 at 8:03 PM, Kun Niu <ha...@gmail.com> wrote:
>
>   
>> You should also specify which library to link I think.
>> Which IDE are you using?
>>
>> Sanat Talmaki wrote:
>>
>>     
>>> Btw, I am sorry for forgetting to attach my code in my previous mail. Here
>>> is my code:
>>>
>>> #include <xercesc/util/PlatformUtils.hpp>
>>> // Other include files, declarations, and non-Xerces-C++ initializations.
>>> #include <iostream>
>>> //#include <conio.h>
>>>
>>>
>>> using namespace xercesc;
>>>
>>> int main(int argc, char* argv[])
>>> {
>>>  try {
>>>    XMLPlatformUtils::Initialize();
>>>  }
>>>  catch (const XMLException& toCatch) {
>>>    // Do your failure processing here
>>>    return 1;
>>>  }
>>>
>>>  // Do your actual work with Xerces-C++ here.
>>>
>>>  XMLPlatformUtils::Terminate();
>>>
>>>  // Other terminations and cleanup.
>>>  return 0;
>>> }
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Sanat.
>>>
>>>
>>> On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <sanat.schumi@gmail.com
>>>       
>>>> wrote:
>>>>         
>>>
>>>       
>>>> Hello everybody,
>>>> I am Sanat.
>>>>
>>>> I just downloaded the xerces source code and tried to build it. The build
>>>> succeeded, but when I tried the sample of code in the programming
>>>> section, I
>>>> got the following errors. I am using Visual Studio 2008 and my OS is
>>>> Vista
>>>> 64 bit:
>>>>
>>>> 1>Linking...
>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>> "__declspec(dllimport) public: static void __cdecl
>>>> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
>>>> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
>>>> function __catch$_main$0
>>>> 1>main.obj : error LNK2019: unresolved external symbol
>>>> "__declspec(dllimport) public: static void __cdecl
>>>> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
>>>> const,class xercesc_3_0::PanicHandler * const,class
>>>> xercesc_3_0::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils
>>>> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced
>>>> in function _main
>>>> 1>main.obj : error LNK2001: unresolved external symbol
>>>> "__declspec(dllimport) public: static char const * const
>>>> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
>>>> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
>>>> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
>>>> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3
>>>> unresolved
>>>> externals
>>>> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
>>>> 2010\xercesParser\Debug\BuildLog.htm"
>>>> 1>xercesParser - 4 error(s), 0 warning(s)
>>>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>>>> ==========
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>> I feel I am not linking the library or something like that. But I added
>>>> the
>>>> entire xerces folder in my project properties under linker in visual
>>>> studio.
>>>>
>>>> Any help would be fantastic. I am just starting out using xerces so
>>>> please
>>>> forgive me if my error is too dumbed out.
>>>>
>>>> Thanks,
>>>>
>>>> Sincerely,
>>>>
>>>> Sanat.
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>
>>>       
>>     
>
>   


Re: Linking Error

Posted by Sanat Talmaki <sa...@gmail.com>.
the documentation says link it to the xerces-c_3.lib. But I couldn't find
where exactly this file might be located.
I am using the Visual Studio 2008 IDE.

Thanks,
Sanat.

On Thu, Jan 28, 2010 at 8:03 PM, Kun Niu <ha...@gmail.com> wrote:

> You should also specify which library to link I think.
> Which IDE are you using?
>
> Sanat Talmaki wrote:
>
>> Btw, I am sorry for forgetting to attach my code in my previous mail. Here
>> is my code:
>>
>> #include <xercesc/util/PlatformUtils.hpp>
>> // Other include files, declarations, and non-Xerces-C++ initializations.
>> #include <iostream>
>> //#include <conio.h>
>>
>>
>> using namespace xercesc;
>>
>> int main(int argc, char* argv[])
>> {
>>  try {
>>    XMLPlatformUtils::Initialize();
>>  }
>>  catch (const XMLException& toCatch) {
>>    // Do your failure processing here
>>    return 1;
>>  }
>>
>>  // Do your actual work with Xerces-C++ here.
>>
>>  XMLPlatformUtils::Terminate();
>>
>>  // Other terminations and cleanup.
>>  return 0;
>> }
>>
>>
>>
>>
>> Thanks,
>>
>> Sanat.
>>
>>
>> On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <sanat.schumi@gmail.com
>> >wrote:
>>
>>
>>
>>> Hello everybody,
>>> I am Sanat.
>>>
>>> I just downloaded the xerces source code and tried to build it. The build
>>> succeeded, but when I tried the sample of code in the programming
>>> section, I
>>> got the following errors. I am using Visual Studio 2008 and my OS is
>>> Vista
>>> 64 bit:
>>>
>>> 1>Linking...
>>> 1>main.obj : error LNK2019: unresolved external symbol
>>> "__declspec(dllimport) public: static void __cdecl
>>> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
>>> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
>>> function __catch$_main$0
>>> 1>main.obj : error LNK2019: unresolved external symbol
>>> "__declspec(dllimport) public: static void __cdecl
>>> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
>>> const,class xercesc_3_0::PanicHandler * const,class
>>> xercesc_3_0::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils
>>> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced
>>> in function _main
>>> 1>main.obj : error LNK2001: unresolved external symbol
>>> "__declspec(dllimport) public: static char const * const
>>> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
>>> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
>>> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
>>> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3
>>> unresolved
>>> externals
>>> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
>>> 2010\xercesParser\Debug\BuildLog.htm"
>>> 1>xercesParser - 4 error(s), 0 warning(s)
>>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>>> ==========
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>> I feel I am not linking the library or something like that. But I added
>>> the
>>> entire xerces folder in my project properties under linker in visual
>>> studio.
>>>
>>> Any help would be fantastic. I am just starting out using xerces so
>>> please
>>> forgive me if my error is too dumbed out.
>>>
>>> Thanks,
>>>
>>> Sincerely,
>>>
>>> Sanat.
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Re: Linking Error

Posted by Kun Niu <ha...@gmail.com>.
You should also specify which library to link I think.
Which IDE are you using?
Sanat Talmaki wrote:
> Btw, I am sorry for forgetting to attach my code in my previous mail. Here
> is my code:
>
> #include <xercesc/util/PlatformUtils.hpp>
> // Other include files, declarations, and non-Xerces-C++ initializations.
> #include <iostream>
> //#include <conio.h>
>
>
> using namespace xercesc;
>
> int main(int argc, char* argv[])
> {
>   try {
>     XMLPlatformUtils::Initialize();
>   }
>   catch (const XMLException& toCatch) {
>     // Do your failure processing here
>     return 1;
>   }
>
>   // Do your actual work with Xerces-C++ here.
>
>   XMLPlatformUtils::Terminate();
>
>   // Other terminations and cleanup.
>   return 0;
> }
>
>
>
>
> Thanks,
>
> Sanat.
>
>
> On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <sa...@gmail.com>wrote:
>
>   
>> Hello everybody,
>> I am Sanat.
>>
>> I just downloaded the xerces source code and tried to build it. The build
>> succeeded, but when I tried the sample of code in the programming section, I
>> got the following errors. I am using Visual Studio 2008 and my OS is Vista
>> 64 bit:
>>
>> 1>Linking...
>> 1>main.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: static void __cdecl
>> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
>> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
>> function __catch$_main$0
>> 1>main.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: static void __cdecl
>> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
>> const,class xercesc_3_0::PanicHandler * const,class
>> xercesc_3_0::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils
>> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced
>> in function _main
>> 1>main.obj : error LNK2001: unresolved external symbol
>> "__declspec(dllimport) public: static char const * const
>> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
>> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
>> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
>> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3 unresolved
>> externals
>> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
>> 2010\xercesParser\Debug\BuildLog.htm"
>> 1>xercesParser - 4 error(s), 0 warning(s)
>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
>>
>>
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> I feel I am not linking the library or something like that. But I added the
>> entire xerces folder in my project properties under linker in visual studio.
>>
>> Any help would be fantastic. I am just starting out using xerces so please
>> forgive me if my error is too dumbed out.
>>
>> Thanks,
>>
>> Sincerely,
>>
>> Sanat.
>>
>>
>>     
>
>   


Re: Linking Error

Posted by Sanat Talmaki <sa...@gmail.com>.
Btw, I am sorry for forgetting to attach my code in my previous mail. Here
is my code:

#include <xercesc/util/PlatformUtils.hpp>
// Other include files, declarations, and non-Xerces-C++ initializations.
#include <iostream>
//#include <conio.h>


using namespace xercesc;

int main(int argc, char* argv[])
{
  try {
    XMLPlatformUtils::Initialize();
  }
  catch (const XMLException& toCatch) {
    // Do your failure processing here
    return 1;
  }

  // Do your actual work with Xerces-C++ here.

  XMLPlatformUtils::Terminate();

  // Other terminations and cleanup.
  return 0;
}




Thanks,

Sanat.


On Thu, Jan 28, 2010 at 7:55 PM, Sanat Talmaki <sa...@gmail.com>wrote:

> Hello everybody,
> I am Sanat.
>
> I just downloaded the xerces source code and tried to build it. The build
> succeeded, but when I tried the sample of code in the programming section, I
> got the following errors. I am using Visual Studio 2008 and my OS is Vista
> 64 bit:
>
> 1>Linking...
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static void __cdecl
> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
> function __catch$_main$0
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static void __cdecl
> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
> const,class xercesc_3_0::PanicHandler * const,class
> xercesc_3_0::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils
> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced
> in function _main
> 1>main.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: static char const * const
> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3 unresolved
> externals
> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
> 2010\xercesParser\Debug\BuildLog.htm"
> 1>xercesParser - 4 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
>
>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I feel I am not linking the library or something like that. But I added the
> entire xerces folder in my project properties under linker in visual studio.
>
> Any help would be fantastic. I am just starting out using xerces so please
> forgive me if my error is too dumbed out.
>
> Thanks,
>
> Sincerely,
>
> Sanat.
>
>

Re: Linking Error

Posted by Kun Niu <ha...@gmail.com>.
2010/1/29 Sanat Talmaki <sa...@gmail.com>

> Hello everybody,
> I am Sanat.
>
> I just downloaded the xerces source code and tried to build it. The build
> succeeded, but when I tried the sample of code in the programming section,
> I
> got the following errors. I am using Visual Studio 2008 and my OS is Vista
> 64 bit:
>
> 1>Linking...
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static void __cdecl
> xercesc_3_0::XMLPlatformUtils::Terminate(void)"
> (__imp_?Terminate@XMLPlatformUtils@xercesc_3_0@@SAXXZ) referenced in
> function __catch$_main$0
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static void __cdecl
> xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
> const,class xercesc_3_0::PanicHandler * const,class
> xercesc_3_0::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils
> @xercesc_3_0@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced
> in
> function _main
> 1>main.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: static char const * const
> xercesc_3_0::XMLUni::fgXercescDefaultLocale"
> (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)
> 1>C:\Users\Sanat\Desktop\CEM_Res\Jan
> 2010\xercesParser\Debug\xercesParser.exe : fatal error LNK1120: 3
> unresolved
> externals
> 1>Build log was saved at "file://c:\Users\Sanat\Desktop\CEM_Res\Jan
> 2010\xercesParser\Debug\BuildLog.htm"
> 1>xercesParser - 4 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
>
>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I feel I am not linking the library or something like that. But I added the
> entire xerces folder in my project properties under linker in visual
> studio.
>
This is not sufficient. You should also explicitly specify the library
you're linking with.
That's why I hate IDE for junior programmer.

>
> Any help would be fantastic. I am just starting out using xerces so please
> forgive me if my error is too dumbed out.
>
> Thanks,
>
> Sincerely,
>
> Sanat.
>



-- 
        牛坤
MSN:haoniukun@hotmail.com <MS...@hotmail.com>