From lydia_coin3d@yahoo.fr Sat Nov 9 16:28:25 2002 Received: with ECARTIS (v1.0.0; list info-inventor); Sat, 09 Nov 2002 16:28:27 -0800 (PST) Received: from web21503.mail.yahoo.com (web21503.mail.yahoo.com [66.163.169.14]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id gAA0SPuR023461 for ; Sat, 9 Nov 2002 16:28:25 -0800 Message-ID: <20021110002948.85933.qmail@web21503.mail.yahoo.com> Received: from [129.194.8.73] by web21503.mail.yahoo.com via HTTP; Sun, 10 Nov 2002 01:29:48 CET Date: Sun, 10 Nov 2002 01:29:48 +0100 (CET) From: =?iso-8859-1?q?lydia=20coin?= Subject: Setpickfiltercallback and events handling To: info-inventor@oss.sgi.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1497904347-1036888188=:85862" Content-Transfer-Encoding: 8bit X-archive-position: 31 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: lydia_coin3d@yahoo.fr Precedence: bulk X-list: info-inventor --0-1497904347-1036888188=:85862 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi folks I'm using VC++ under windows and coin3D I have the following code SoSeparator *rootPoly=new SoSeparator; rootPoly->ref(); PtData->Callback=new SoEventCallback(); PtData->Callback->addEventCallback(SoKeyboardEvent::getClassTypeId(),callbackChgKey,PtData); PtData->Callback->addEventCallback(SoMouseButtonEvent::getClassTypeId(),callbackChgButton,PtData); SoSelection *sel = new SoSelection; sel->ref(); sel->policy.setValue(SoSelection::TOGGLE); sel->setPickFilterCallback(pickFilterCB,(void*)PtData, false); sel->addChild(PtData->rootPts); sel->addChild(color); sel->addChild(rootPolyLine); sel->addChild(PtData->Callback); rootPoly->addChild(sel); My problem is that when I pick up the window, the function callbackChgButton() is called twice ( onmce for button up and once for button down) then the function pickFilterCB() is called. How to solve this problem so that the function pickFilterCB() is called before the second call of callbackChgButton() I can't find the solution and any help will be appreciated --------------------------------- Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français ! --0-1497904347-1036888188=:85862 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit

Hi folks

I'm using VC++ under windows and coin3D

I have the following code

SoSeparator *rootPoly=new SoSeparator;   rootPoly->ref();

 PtData->Callback=new SoEventCallback();  

 PtData->Callback->addEventCallback(SoKeyboardEvent::getClassTypeId(),callbackChgKey,PtData);
 PtData->Callback->addEventCallback(SoMouseButtonEvent::getClassTypeId(),callbackChgButton,PtData);

 SoSelection *sel = new SoSelection;  


 sel->ref();
 sel->policy.setValue(SoSelection::TOGGLE);
 sel->setPickFilterCallback(pickFilterCB,(void*)PtData, false);

sel->addChild(PtData->rootPts);
 sel->addChild(color);
 sel->addChild(rootPolyLine);
 sel->addChild(PtData->Callback);

rootPoly->addChild(sel);

My problem is that when I pick up the window, the function callbackChgButton() is called twice ( onmce for button up and once for button down) then the function pickFilterCB() is called.

How to solve this problem so that the function pickFilterCB() is called before the second call of callbackChgButton()

I can't find the solution and any help will be appreciated

 



Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
--0-1497904347-1036888188=:85862-- From Michael.Stolz@tugraz.at Tue Nov 19 07:17:21 2002 Received: with ECARTIS (v1.0.0; list info-inventor); Tue, 19 Nov 2002 07:17:23 -0800 (PST) Received: from mailrelay.tugraz.at (mailrelay.tu-graz.ac.at [129.27.3.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id gAJFHJuR018232 for ; Tue, 19 Nov 2002 07:17:20 -0800 Received: from fmechgpc05.tugraz.at (fmechgsg05.tu-graz.ac.at [129.27.94.154]) by mailrelay.tugraz.at (8.12.6/8.12.6) with ESMTP id gAJFJMBe023819 for ; Tue, 19 Nov 2002 16:19:22 +0100 (MET) Subject: gcc 3.2 compiling Problems (conflicts with previous declaration?) From: Michael Stolz To: info-inventor@oss.sgi.com Content-Type: text/plain; charset=ISO-8859-15 X-Mailer: Evolution/1.0.2 Date: 19 Nov 2002 16:18:35 +0100 Message-Id: <1037719115.2434.21.camel@fmechgpc05> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id gAJFHJuR018232 X-archive-position: 32 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: Michael.Stolz@tugraz.at Precedence: bulk X-list: info-inventor I tryed to compile inventor-2.1.5-9.src.tar.gz under gentoo 1.4 and SUSE 8.1 (both use gcc 3.2) I got the following error message after running gmake install: /usr/bin/g++ -DLIBRARYBUILD -I/usr/X11R6/include -I. -I../../../../../../../lib/database/include -I../../../../../../../lib/interaction/include -I../../../../../../../lib/nodekits/include -I../../../../../../../libSoXt/include -I../head -fPIC -DIVPREFIX=\"/usr\" -g -c nurbsClient.c++ In file included from gl4surfeval.c++:49, from nurbsClient.c++:57: /usr/include/stdio.h:320: declaration of C function `int printf(int, const char*, ...)' conflicts with /usr/include/stdio.h:276: previous declaration `int printf(const char*, ...)' here In file included from nurbsClient.c++:57: gl4surfeval.c++: In member function `virtual void _SoNurbsGL4SurfaceEval::bgnmap2f(long int)': gl4surfeval.c++:78: invalid conversion from `const char*' to `int' /usr/include/stdio.h:320: too few arguments to function `int printf(int, const char*, ...)' .... gl4surfeval.c++:226: at this point in file gmake[7]: *** [nurbsClient.o] Fehler 1 gmake[7]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib/database/src/so/nodes/nurbs/clients« gmake[6]: *** [all] Fehler 1 gmake[6]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib/database/src/so/nodes/nurbs« gmake[5]: *** [all] Fehler 1 gmake[5]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib/database/src/so/nodes« gmake[4]: *** [all] Fehler 1 gmake[4]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib/database/src/so« gmake[3]: *** [all] Fehler 1 gmake[3]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib/database/src« gmake[2]: *** [all] Fehler 1 gmake[2]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib/database« gmake[1]: *** [libInventor.a] Fehler 1 gmake[1]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/lib« gmake: *** [install] Fehler 1 does anybody know what to do here? thanx, Michael From joern.beutner@web.de Tue Nov 19 08:51:40 2002 Received: with ECARTIS (v1.0.0; list info-inventor); Tue, 19 Nov 2002 08:51:42 -0800 (PST) Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id gAJGpduR019448 for ; Tue, 19 Nov 2002 08:51:39 -0800 Received: from fwd06.sul.t-online.de by mailout03.sul.t-online.com with smtp id 18EBd3-0002qd-07; Tue, 19 Nov 2002 17:53:37 +0100 Received: from hal (520080106055-0001@[217.231.218.185]) by fmrl06.sul.t-online.com with esmtp id 18EBcq-2DNqxEC; Tue, 19 Nov 2002 17:53:24 +0100 Content-Type: text/plain; charset="iso-8859-15" From: =?iso-8859-15?q?J=F6rn=20Beutner?= Reply-To: joern.beutner@web.de To: Michael Stolz , info-inventor@oss.sgi.com Subject: Re: gcc 3.2 compiling Problems (conflicts with previous declaration?) Date: Tue, 19 Nov 2002 17:53:22 +0100 User-Agent: KMail/1.4.3 References: <1037719115.2434.21.camel@fmechgpc05> In-Reply-To: <1037719115.2434.21.camel@fmechgpc05> MIME-Version: 1.0 Message-Id: <200211191753.22809.joern.beutner@web.de> X-Sender: 520080106055-0001@t-dialin.net Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id gAJGpduR019448 X-archive-position: 33 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: joern.beutner@web.de Precedence: bulk X-list: info-inventor Hi Michael , On Tuesday 19 November 2002 16:18, Michael Stolz wrote: > I tryed to compile inventor-2.1.5-9.src.tar.gz under gentoo 1.4 and > SUSE 8.1 (both use gcc 3.2) > > I got the following error message after running gmake install: > > /usr/bin/g++ -DLIBRARYBUILD -I/usr/X11R6/include -I. > -I../../../../../../../lib/database/include > -I../../../../../../../lib/interaction/include > -I../../../../../../../lib/nodekits/include > -I../../../../../../../libSoXt/include -I../head -fPIC > -DIVPREFIX=\"/usr\" -g -c nurbsClient.c++ > In file included from gl4surfeval.c++:49, > from nurbsClient.c++:57: > /usr/include/stdio.h:320: declaration of C function `int > printf(int, const > char*, ...)' conflicts with > /usr/include/stdio.h:276: previous declaration `int printf(const > char*, ...)' > here > In file included from nurbsClient.c++:57: > gl4surfeval.c++: In member function `virtual void > _SoNurbsGL4SurfaceEval::bgnmap2f(long int)': > gl4surfeval.c++:78: invalid conversion from `const char*' to `int' > /usr/include/stdio.h:320: too few arguments to function `int > printf(int, const > char*, ...)' > > .... > > gl4surfeval.c++:226: at this point in file > gmake[7]: *** [nurbsClient.o] Fehler 1 > gmake[7]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib/database/src/so/nodes/nurbs/clients« > gmake[6]: *** [all] Fehler 1 > gmake[6]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib/database/src/so/nodes/nurbs« > gmake[5]: *** [all] Fehler 1 > gmake[5]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib/database/src/so/nodes« > gmake[4]: *** [all] Fehler 1 > gmake[4]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib/database/src/so« > gmake[3]: *** [all] Fehler 1 > gmake[3]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib/database/src« > gmake[2]: *** [all] Fehler 1 > gmake[2]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib/database« > gmake[1]: *** [libInventor.a] Fehler 1 > gmake[1]: Verlassen des Verzeichnisses > »/pc19/home/stolz/inventor/lib« gmake: *** [install] Fehler 1 > > > does anybody know what to do here? > thanx, > Michael your problem is a result of a double definition of the dprintf(...) function. One is defined in the inventor source, the other is a part of the gcc compiler. You can switch of the second by switching of the _GNU_SOURCE prepocessor variable. One easy way to do this, is to modify the LINUXOPTS variable in the file inventor/make/ivcommondefs in the following way: LINUXOPTS = -fPIC -U_GNU_SOURCE Bye, Joern From Michael.Stolz@tugraz.at Wed Nov 20 06:06:15 2002 Received: with ECARTIS (v1.0.0; list info-inventor); Wed, 20 Nov 2002 06:06:18 -0800 (PST) Received: from mailrelay.tugraz.at (mailrelay.tu-graz.ac.at [129.27.3.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id gAKE6DuR007522 for ; Wed, 20 Nov 2002 06:06:14 -0800 Received: from fmechgpc05.tugraz.at (fmechgsg05.tu-graz.ac.at [129.27.94.154]) by mailrelay.tugraz.at (8.12.6/8.12.6) with ESMTP id gAKE8JaD013831; Wed, 20 Nov 2002 15:08:19 +0100 (MET) Subject: Re: gcc 3.2 compiling Problems (conflicts with previous declaration?) From: Michael Stolz To: info-inventor@oss.sgi.com Cc: joern.beutner@web.de In-Reply-To: <200211191753.22809.joern.beutner@web.de> References: <1037719115.2434.21.camel@fmechgpc05> <200211191753.22809.joern.beutner@web.de> Content-Type: text/plain; charset=ISO-8859-15 X-Mailer: Evolution/1.0.2 Date: 20 Nov 2002 15:07:27 +0100 Message-Id: <1037801247.8386.15.camel@fmechgpc05> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id gAKE6DuR007522 X-archive-position: 34 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: Michael.Stolz@tugraz.at Precedence: bulk X-list: info-inventor Thank you for the fast help! I made the suggested changes at the LINUXOPTS variable in the file inventor/make/ivcommondefs (LINUXOPTS = -fPIC -U_GNU_SOURCE). After cleaning and recompiling i got the following error messages: gmake[3]: Wechsel in das Verzeichnis »/pc19/home/stolz/inventor/apps/demos/SceneViewer« /usr/bin/g++ -I/usr/X11R6/include -I. -I../../../lib/database/include -I../../../lib/interaction/include -I../../../lib/nodekits/include -I../../../libSoXt/include -fPIC -U_GNU_SOURCE -DIVPREFIX=\"/usr\" -g -c SceneViewer.c++ /usr/bin/g++ -I/usr/X11R6/include -I. -I../../../lib/database/include -I../../../lib/interaction/include -I../../../lib/nodekits/include -I../../../libSoXt/include -fPIC -U_GNU_SOURCE -DIVPREFIX=\"/usr\" -g -c SoSceneViewer.c++ /tmp/ccrcMA3c.s: Assembler messages: /tmp/ccrcMA3c.s:1115: Error: subtraction of two symbols in different sections `.bss' {.bss section} - `lightData' {.data.rel.local section} at file address 000000000000054c /tmp/ccrcMA3c.s:1122: Error: subtraction of two symbols in different sections `.bss' {.bss section} - `lightData' {.data.rel.local section} at file address 0000000000000568 /tmp/ccrcMA3c.s:1129: Error: subtraction of two symbols in different sections `.bss' {.bss section} - `lightData' {.data.rel.local section} at file address 0000000000000584 /tmp/ccrcMA3c.s:1136: Error: subtraction of two symbols in different sections `.bss' {.bss section} - `lightData' {.data.rel.local section} at file address 00000000000005a0 /tmp/ccrcMA3c.s:1143: Error: subtraction of two symbols in different sections `.bss' {.bss section} - `lightData' {.data.rel.local section} at file address 00000000000005bc gmake[3]: *** [SoSceneViewer.o] Fehler 1 gmake[3]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/apps/demos/SceneViewer« gmake[2]: *** [install] Fehler 1 gmake[2]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/apps/demos« gmake[1]: *** [install] Fehler 1 gmake[1]: Verlassen des Verzeichnisses »/pc19/home/stolz/inventor/apps« gmake: *** [install] Fehler 1 What should i do now? Bye, Michael