How did the error Unable to load proj.dll come about in eaerth2.10.1?

classic Classic list List threaded Threaded
2 messages Options
Mirro187 Mirro187
Reply | Threaded
Open this post in threaded view
|

How did the error Unable to load proj.dll come about in eaerth2.10.1?

This post was updated on .
env is osg 3.6.4 osgearth 2.10.0 system win10  GXT1660 Ti

#include <osg/Notify>
#include <osgGA/GUIEventHandler>
#include <osgGA/StateSetManipulator>
#include <osgViewer/Viewer>

#include <osgEarth/MapNode>
#include <osgEarth/ImageLayer>
#include <osgEarth/TMS>

#include <osgEarth/ExampleResources>
#include <osgEarth/EarthManipulator>
#include <osgEarth/LogarithmicDepthBuffer>

#include <osgEarth/FeatureModelLayer>
#include <osgEarth/OGRFeatureSource>

using namespace osgEarth;
using namespace osgEarth::Util;

// forward declarations.
void addImagery  (Map* map);


int main(int argc, char** argv)
{
    osgEarth::initialize();
    osg::ArgumentParser arguments(&argc,argv);

    // create the map.
    osg::ref_ptr<Map> map = new Map();

    addImagery( map.get() );

    // initialize a viewer:
    osgViewer::Viewer viewer(arguments);

    EarthManipulator* manip = new EarthManipulator();
    viewer.setCameraManipulator( manip );

    osg::Group* root = new osg::Group();
    viewer.setSceneData( root );

    // make the map scene graph:
    MapNode* mapNode = new MapNode(map.get());
    root->addChild( mapNode );

    // zoom to a good startup position
    manip->setViewpoint( Viewpoint(
        "Home",
        -71.0763, 42.34425, 0,   // longitude, latitude, altitude
         24.261, -21.6, 3450.0), // heading, pitch, range
         5.0 );                    // duration

    // This will mitigate near clip plane issues if you zoom in close to the ground:
    LogarithmicDepthBuffer buf;
    buf.install( viewer.getCamera() );

    return viewer.run();
}

void addImagery(Map* map)
{
    // add a TMS imagery layer:
    TMSOptions imagery;
    imagery.url() = "tms.xml"
    ImageLayer* layer = new ImageLayer("test",imagery);
    map->addLayer(layer);
}
gangzou gangzou
Reply | Threaded
Open this post in threaded view
|

Re: How did the error Unable to load proj.dll come about in eaerth2.10.1?

   It look like lib proj  not link properly to gdal library.