linker error while compiling osgEarthUtil

classic Classic list List threaded Threaded
4 messages Options
macher macher
Reply | Threaded
Open this post in threaded view
|

linker error while compiling osgEarthUtil

        error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class osgEarth::SpatialReference * __cdecl osgEarth::SpatialReference::create(class osg::CoordinateSystemNode *)" (__imp_?create@SpatialReference@osgEarth@@SAPAV12@PAVCoordinateSystemNode@osg@@@Z) referenced in function "public: class osgEarth::SpatialReference const * __thiscall osgEarthUtil::EarthManipulator::getSRS(void)const " (?getSRS@EarthManipulator@osgEarthUtil@@QBEPBVSpatialReference@osgEarth@@XZ) EarthManipulator.obj osgEarthUtil

I have added the path of osgEarthd.lib to osgEarthUtil and osgEarth compiles successfully. All other projects in the source compile successfully.

Any help please ?
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: linker error while compiling osgEarthUtil

Hi,

Try updating to the latest osgEarth from SVN, rerunning CMake and building.  I believe it was fixed with rev 464.

Thanks,

Jason

On Thu, Jul 23, 2009 at 10:09 AM, macher (via Nabble) <[hidden email]> wrote:
        error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class osgEarth::SpatialReference * __cdecl osgEarth::SpatialReference::create(class osg::CoordinateSystemNode *)" (__imp_?create@SpatialReference@osgEarth@@SAPAV12@PAVCoordinateSystemNode@osg@@@Z) referenced in function "public: class osgEarth::SpatialReference const * __thiscall osgEarthUtil::EarthManipulator::getSRS(void)const " (?getSRS@EarthManipulator@osgEarthUtil@@QBEPBVSpatialReference@osgEarth@@XZ) EarthManipulator.obj osgEarthUtil

I have added the path of osgEarthd.lib to osgEarthUtil and osgEarth compiles successfully. All other projects in the source compile successfully.

Any help please ?



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


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

Re: linker error while compiling osgEarthUtil

Hi,
I have the latest code, just checked it out today and updated it also. i am still getting that linker error for osgEarthUtil. What is the solution, can i do it on my own or u will have to update the code ?
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: linker error while compiling osgEarthUtil

It sounds to me like osgEarthUtil isn't linking against osgEarth.  That was the issue that I fixed (supposedly) in rev 464.  Can you try rerunning CMake and see if works?  Also, open up your linker page for osgEarthUtil and see if osgEarth is being linked properly.

Also, make sure you are using CMake 2.6 or better.  I'm using CMake 2.6.4 and it works fine.

Jason

On Thu, Jul 23, 2009 at 10:42 AM, macher (via Nabble) <[hidden email]> wrote:
Hi,
I have the latest code, just checked it out today and updated it also. i am still getting that linker error for osgEarthUtil. What is the solution, can i do it on my own or u will have to update the code ?


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