[petsc-users] Linking error with C++ code: undefined symbols

Jed Brown jed at 59A2.org
Wed Mar 24 13:20:08 CDT 2010


On Wed, 24 Mar 2010 12:12:14 -0600, charles reid <charlesreid1 at gmail.com> wrote:
> Hi Matt,
> 
> That alternative line gives me problems - but works if I add
> ${PETSC_CC_INCLUDES} to the compiler command.  If I don't, I see this stuff:

That's because you didn't do what he said:

> > Laplace: Laplace.o $(OBJ_FILES)
> >     -${CLINKER} -o bin.x Laplace.o $(OBJ_FILES) ${PETSC_KSP_LIB}
                             ^^^^^^^^^

That is Laplace.o, not Laplace.cc.  There is no reason why one of your
source files has to be compiled differently from the others.

Jed


More information about the petsc-users mailing list