Contributions are meant to be a part of OSGSystem. So you need to either compile a new version of osgsystem.dll (with contribs). That can be done with scons and enabling contrib_terrain.
Or, compile separately as you do, but replace the OSG_SYSTEMLIB_DLLMAPPING in that source with something more applicable, i.e. nothing if static or exe or a similar dll import/export macro if in a dll. Cheers, /Marcus [EMAIL PROTECTED] wrote: > Hello Dirk, > > what I actually tried is: I checked out the > /OpenSG/Source/Contrib/Terrain directory from sourceforge. Than I > added all the .cpp, .h, .inl files to a Visual Studio Project and > tried to compile it (I tried several different VS-Projects like dll, > static lib and executable). Doing this I allways get the following errors: > > c:\source\OpenSG\TerrainExamples\OSGTerrainBase.cpp(67): warning > C4273: 'osg::HeightDataFieldMask' : inconsistent dll linkage > c:\source\OpenSG\TerrainExamples\OSGTerrainBase.cpp(67): error C2491: > 'osg::TerrainBase::HeightDataFieldMask' : definition of dllimport > static data member not allowed > When I only use the testTerrain.cpp, and include the OSGTerrain.h from > the standard OpenSG tree I can compile the file, but then the linker > fails (see my last e-mail). I use the precompiled OpenSG 1.6 from the > download area. What would be the right way to use the Contributions? > Do I have to compile OpenSG myself? Is there a way to get the > contributions in there under windows, e.g. by using scons? Has > somebody experience with using something from the contributions in > VisualStudio. > > Kind regards, > Bjoern > > > > ----- Ursprüngliche Nachricht ----- > Von: Dirk Reiners > Datum: Sonntag, Mai 20, 2007 5:23 pm > Betreff: Re: [Opensg-users] Terrains in OpenSG 1.6 > An: [email protected] > > > > > Hi Bjoern, > > > > [EMAIL PROTECTED] wrote: > > > Dear all, > > > > > > I want to try out the OSGTerrain class in OpenSG 1.6, using > > the > > > testTerrain.cpp file I got from the repository. Environment > > is Visual > > > Studio 2003 on Windows. > > > > > > When I compile the linker fails with a couple of the following > > messages:> > > > testTerrain.obj : error LNK2019: unresolved external symbol > > > "__declspec(dllimport) public: void __thiscall > > > osg::TerrainBase::setPerPixelLighting(bool const &)" > > > ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) > > referenced in > > > function _main > > > > > > testTerrain.obj : error LNK2019: unresolved external symbol > > > "__declspec(dllimport) public: void __thiscall > > > osg::TerrainBase::setDetail(float const &)" > > > ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) referenced in > > function _main > > > > > > etc .... > > > > > > Looks like I am missing out libraries but I think that I > > included > > > everything I could find in OpenSG/lib. > > > > > > Has somebody an idea? > > > > Did you compile the Contrib lib yourself? Did you add the > > Terrain parts > > to it? By default the Terrain is not included, and neither is > > the > > Contrib library itself. AFAIR we don't have VS Project files for > > Contrib, can somebodt verify that? > > > > Dirk > > > > ----------------------------------------------------------------- > > -------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Opensg-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/opensg-users > > > > > ------------------------------------------------------------------------- > Dr. Bjoern Zehner > UFZ Centre for Environmental Research Leipzig-Halle > Permoserstrasse 15 > 04318 Leipzig > Germany > http://www.ufz.de/index.php?en=5673 > Tel: ++49 (341) 235 3979 > Fax: ++49 (341) 235 3939 > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Opensg-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensg-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
