linker error while compiling osgEarth

classic Classic list List threaded Threaded
3 messages Options
ronaldv ronaldv
Reply | Threaded
Open this post in threaded view
|

linker error while compiling osgEarth

I got linker errors like:

XmlUtils.obj : error LNK2019: unresolved external symbol __imp__XML_ErrorString referenced in function "public: static class osgEarth::XmlDocument * __cdecl osgEarth::XmlDocument::load(class std::basic_istream<char,struct std::char_traits<char> > &)" (?load@XmlDocument@osgEarth@@SAPAV12@AAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)

XmlUtils.obj : error LNK2019: unresolved external symbol __imp__XML_GetErrorCode referenced in function "public: static class osgEarth::XmlDocument * __cdecl osgEarth::XmlDocument::load(class std::basic_istream<char,struct std::char_traits<char> > &)" (?load@XmlDocument@osgEarth@@SAPAV12@AAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)

while creating osgEarth.lib

All other projects compile fine.

I'm trying to build osgearth_1.2_T2009-08-12.r566 using CMake 2.6.4 and Visual Studio 2008. DYNAMIC_OSGEARTH is checked in CMake.

Any help please?

jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: linker error while compiling osgEarth

Hi Ronald,

It looks like you are not linking against Expat.  What is the value of EXPAT_LIBRARY in your CMakeCache.txt file?

Jason

On Wed, Sep 16, 2009 at 5:39 AM, ronaldv (via Nabble) <[hidden email]> wrote:
I got linker errors like:

XmlUtils.obj : error LNK2019: unresolved external symbol __imp__XML_ErrorString referenced in function "public: static class osgEarth::XmlDocument * __cdecl osgEarth::XmlDocument::load(class std::basic_istream<char,struct std::char_traits<char> > &)" (?load@XmlDocument@osgEarth@@SAPAV12@AAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)

XmlUtils.obj : error LNK2019: unresolved external symbol __imp__XML_GetErrorCode referenced in function "public: static class osgEarth::XmlDocument * __cdecl osgEarth::XmlDocument::load(class std::basic_istream<char,struct std::char_traits<char> > &)" (?load@XmlDocument@osgEarth@@SAPAV12@AAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)

while creating osgEarth.lib

All other projects compile fine.

I'm trying to build osgearth_1.2_T2009-08-12.r566 using CMake 2.6.4 and Visual Studio 2008. DYNAMIC_OSGEARTH is checked in CMake.

Any help please?




View message @ http://n2.nabble.com/linker-error-while-compiling-osgEarth-tp3655155p3655155.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


ronaldv ronaldv
Reply | Threaded
Open this post in threaded view
|

Re: linker error while compiling osgEarth

Hi Jason,

There was indeed a problem with linking expat library:

The value of EXPAT_LIBRARY was /Expat 2.0.1/Bin/libexpatMT.lib

I have changed it to /Expat 2.0.1/Bin/libexpat.lib and now it compiles OK!

Thanks for the hint.

Regards,

Ronald.