Re: [osg-users] [forum] CMake can't find libraries

2019-01-08 Thread Rodrigo Dias
Hi,

Well, I formatted my computer and installed a new Debian version (9.6). 
Installed a fresh copy of OSG, but still got the same error. Probably there's 
some variable missing, but since nobody tells us which variable it is, I said 
"f*** cmake" and compiled from command line. I've tried adding an OSG_ROOT 
variable, pointing to /usr/local, /usr/local/lib and /usr/local/lib64. None 
worked.

This command line works:


Code:
g++ main.cpp -lOpenThreads -losg -losgDB -losgUtil -losgViewer -o main



Even this works:


Code:
g++ main.cpp -losg -losgDB -losgViewer -o main



Thank you!

Cheers,
Rodrigo

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75424#75424





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] CMake can't find libraries

2019-01-08 Thread Luis Izquierdo Mesa
Hi Rodrigo. I have exactly the same problem, with the same book in this page. I 
am using Ubuntu 18.04. I am able to compile osg but not to run the exmple in 
page 44.

... 


Thank you!

Cheers,
Luis

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75386#75386





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] CMake can't find libraries

2019-01-07 Thread Nathan Mielcarek
Hi Rodrigo,

If you run make install from the build directory, all of the includes and
libraries will go to the /usr/local/ directories and then you can set
OSG_ROOT to /usr/local (although I believe it's already on the search
path). It's good practice to not have multiple OSG versions on the search
path as that can lead to potential issues.

-Nathan

On Tue, Jan 1, 2019 at 5:41 PM Rodrigo Dias  wrote:

> Hi,
>
> I'm following OpenSceneGraph 3.0: Beginner's Guide (
> https://www.packtpub.com/game-development/openscenegraph-30-beginners-guide),
> and right at page 44 there is a CMakeLists.txt that won't work. CMake is
> giving the following error message:
>
>
> > Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY)
> > Could NOT find osg (missing:  OSG_LIBRARY)
> > Could NOT find osgDB (missing:  OSGDB_LIBRARY)
> > Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY)
> > Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY)
> > Configuring done
> >
>
>
> The book says "make sure you have the OSG_ROOT environment variable set.
> Otherwise, the find_package() macro may not be able to find OSG
> installations correctly."
>
> This variable is set to the directory of the build, the one which includes
> applications, bin, data, include, lib, packaging and src. However, the
> "include" directory only contains OpenThreads and osg, while
> /usr/local/include contains 18 directories (from a previous installation, I
> guess). Also, the OpenThreads in the build directory only contains two
> files: Config and Version, while the one in /usr/local/include contains 13
> files. What have I done wrong?
>
> Thank you!
>
> Cheers,
> Rodrigo[/url]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75371#75371
>
>
>
>
>
> ___
> 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