Re: [Plib-users] multiple definitions
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2002-11-09 14:50:12
|
Mat Davidson wrote:
> the exact g++ errors are:
>
>
> Mkdir
> /Volumes/Storage/mat/Desktop/ttt3d-0.2.0/ttt3d/build/ttt3d.build/ttt3d.build/Objects-normal/ppc
>
> CompileCplusplus
> /Volumes/Storage/mat/Desktop/ttt3d-0.2.0/ttt3d/build/ttt3d.build/ttt3d.build/Objects-normal/ppc/cell.o
>
> In file included from /usr/include/plib/ssg.h:28,
> from /Volumes/Storage/mat/Desktop/ttt3d-0.2.0/src/p3d.h:36,
> from /Volumes/Storage/mat/Desktop/ttt3d-0.2.0/src/cell.cxx:25:
ttt3d sounds like the program in plib/demos - is that correct?
(it contains a file called 'cell.cxx' and another called 'p3d.h'
so I think it must be).
Have you changed the code at all from what's in the PLIB demos distro?
The standard version doesn't include any 'extern "C"' stuff - so any problem
like that would have to be a bug in the official OS-X headers...which seems
unlikely.
> These are the kinds of errors Im getting.
> It might be interesting to note that it says "declaration of C
> function".....but I still don't know how to fix it
Neither do I.
There should be an option in GCC to make it emit the results of
the pre-processing stage. This is after the '#include' and '#define'
processing has been done.
I would look through that and see if there are any unmatched 'extern "C"'
commands.
I'd also try to compile a VERY simple source file containing something
that's allowed in C++ and not in C and check that it compiles - just as
a way to be sure that you really are using the compiler with the C++
part enabled and not somehow telling it to be a 'pure' C compiler.
eg:
int main ()
{
int x = 0 ;
x = 123 ;
int y = 0 ; <--- Legal in C++ - should generate an error in C
y = 456 ;
}
...if that produces an error then the problem is that you have some funny
problem with the compiler not recognising this as a C++ program and compiling
it as C instead.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
|