Hi Han,

In visual studio 2008 I usually add library directories and bin variables
on a per project basis, by right clicking on the project name in the
solution explorer selecting properties and editing the linker settings.

Without going through your visual studio settings it's hard to say where
you've gone wrong, but I would double check the path to the library that
you've specified because this appears to be a simple case of Visual Studio
not being able to find the lib file.

K.

On 26 March 2012 04:58, Han Wang <wyh891...@yahoo.com.cn> wrote:

> Hi,
>
> I'm a chinese student. I have complied the osgOcean successfully. I can
> run the oceanExample, and do everything in its "applicantion.cpp". But now,
> I meet a problem: If I make a new project, when run the code, it alway
> declare an error:
> LINK : fatal error LNK1181: 无法打开输入文件“..\..\lib\Debug\osgOceanD.lib”,
> (Cannot open the input file:osgOceanD.lib)
>
> My osgOceanD.lib is located in F:\OSG\osgOcean\build\lib\Debug, and I also
> add this path to "TOOLS―>Option ―>Directories-> Library Files". In the
> Windows PATH, I add "F:\OSG\osgOcean\build\bin\Debug".
>
> So, I need to know how to solve this problem.
>
> Thank you!
>
> Cheers,
> Han
>
>
> Following is the test code:
>
>
> #include <osgViewer/Viewer>
> #include <osgDB/ReadFile>
>
> #include <osgGA/TrackballManipulator>
> #include <osgOcean/OceanScene>
> #include <osgOcean/FFTOceanSurface>
>
>
>
>
> int main()
> {
>        osg::ref_ptr<osgViewer::Viewer> viewer =new osgViewer::Viewer;
>
>  
> viewer->setUpViewInWindow(150,150,1024,768,0);//setUpViewInWindow(150,150,1024,768,0);
>
>        osg::ref_ptr<osgOcean::FFTOceanSurface> oceanSurface= new
> osgOcean::FFTOceanSurface(64,256,17,osg::Vec2(1.1f,1.1f),12.0f,1000.0f,0.8f,1e-8,true,2.5,10.f,256);
>
>        osg::ref_ptr<osgOcean::OceanScene> oceanScene=new
> osgOcean::OceanScene(oceanSurface.get());
>        viewer->addEventHandler(oceanSurface->getEventHandler());
>        viewer->addEventHandler(oceanSurface->getEventHandler());
>
>        osgGA::TrackballManipulator *tb = new osgGA::TrackballManipulator;
>
>  
> tb->setHomePosition(osg::Vec3f(0.0,0.0f,20.0),osg::Vec3f(0.0f,20.0f,20.0f),osg::Vec3f(0,0,1));
>        viewer->setCameraManipulator(tb);
>        viewer->setSceneData(oceanSurface);
>        viewer->run();
>        return 0;
> }
>
> This code is ok when copy to "applicantion.cpp", but can't be use in new
> any projects.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=46579#46579
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/ll_334.png
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to