info-inventor
[Top] [All Lists]

Re: gcc 3.2 compiling Problems (conflicts with previous declaration?)

To: Michael Stolz <Michael.Stolz@xxxxxxxxx>, info-inventor@xxxxxxxxxxx
Subject: Re: gcc 3.2 compiling Problems (conflicts with previous declaration?)
From: Jörn Beutner <joern.beutner@xxxxxx>
Date: Tue, 19 Nov 2002 17:53:22 +0100
In-reply-to: <1037719115.2434.21.camel@fmechgpc05>
References: <1037719115.2434.21.camel@fmechgpc05>
Reply-to: joern.beutner@xxxxxx
Sender: info-inventor-bounce@xxxxxxxxxxx
User-agent: KMail/1.4.3
   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



<Prev in Thread] Current Thread [Next in Thread>