<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello Alvaro (?),<br>
<br>
this isn't an OSG problem, it is a pure c++ coding problem...<br>
In your header file you declare a class with a public method, but
you define a function that is not member of your class in your
cpp. <br>
You should define<br>
osg::Camera* Ventana::createCamera(int x, int y, int w, int h)<br>
instead of <br>
osg::Camera* createCamera(int x, int y, int w, int h)<br>
<br>
Furthermore, you don't even instantiate your class Ventana in your
main.<br>
In your main you should create an instance of Ventana <br>
Ventana* myInstance = new Ventana();<br>
As you didn't define any constructor it will use a default
generated constructor for your class.<br>
After this you can call <br>
viewer->addSlave(myInstance->createCamera(300, 100, 900,
600));<br>
This should make it work.<br>
You should consider review your coding basics...<br>
<br>
Regards,<br>
<br>
Christian<br>
<br>
<br>
Le 29/07/2015 13:36, alvaro ginestar rodriguez a écrit :<br>
</div>
<blockquote cite="mid:DUB114-W1298FD8B3F73889D5D6BCAD98C0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">hi everyone !! i would like make a class and
function for make a window in osg, i have this source, but when
i tried them separately, it have errors.
<div>The file "DemoVentana.cpp"it does well, but the other one
no.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
SCHULTE Christian
Ingénieur Recherche
Responsable du Laboratoire de Simulation
ONERA - DCSD/PSEV
Département Commande des Systèmes et Dynamique du Vol
ONERA - Centre de Salon de Provence
BA 701
13661 SALON AIR Cedex - France
Tel :04.90.17.01.45</pre>
</body>
</html>