Hi Satish -<br><br>Thanks for your response. I think this helped me to realize that I was making things harder than they should be.<br><br>I&#39;ve managed to get this working, and here are a few notes:<br><br>1. It was not clear to me why the Petsc-provided makefiles worked, because the compilation of the C code into a &quot;.o&quot; file is buried deep inside several makefiles (e.g. $PETSC_DIR/conf/rules) included in the original example makefile.  So, I was trying to compile each of my &quot;.cc&quot; files into &quot;.o&quot; files manually, then link.  In fact, all I had to do was let Petsc take care of compiling each &quot;.cc&quot; file into a &quot;.o&quot; file, and I only had to give the line to link the libraries to the driver.<br>

<br>2. The only major change I had to make to the example makefiles to get the driver to link and compile was to add ${PETSC_CC_INCLUDES} after ${CLINKER}, like this:<br><br>Laplace: Laplace.cc $(OBJ_FILES)<br>    -${CLINKER} ${PETSC_CC_INCLUDES} Laplace.cc -o bin.x $(OBJ_FILES) ${PETSC_KSP_LIB}<br>

    ${RM} $(OBJ_FILES)<br><br>Otherwise there were some error messages related to header files.<br>
<br><br>Thanks again for your help.<br><br>Charles<br><br><div class="gmail_quote">2010/3/23 Satish Balay <span dir="ltr">&lt;<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



For one we recommend using the latest version i.e petsc-3.0.0 [or the<br>
upcoming petsc-3.1 - via petsc-dev] - but not this old version 2.3.3.<br>
<br>
Secondly - if you want to use PETSc from c++ - the recommended way is<br>
to build it with the configure option &#39;--with-clanguage=cxx&#39;<br>
<br>
And then [after making sure the examples work] use &quot;petsc.h&quot; without<br>
the &quot;extern C&quot; etc. in your code.<br>
<br>
If the examples compile fine - - but not your code - the issuse is<br>
usually the makefile [make it as close to a petsc makefile as possible<br>
- for eg: src/ksp/ksp/examples/tutorials/makefile].<br>
<font color="#888888"><br>
Satish<br>
</font><div><div></div><div><br>
On Tue, 23 Mar 2010, charles reid wrote:<br>
<br>
&gt; (Please let me know if I can give any additional information that would be<br>
&gt; helpful for this problem.)<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m trying to use Petsc in an object-oriented C++ code, developing with g++<br>
&gt; on Mac OS X 10.5, and I&#39;m running into some problems in the linking stage.<br>
&gt; I&#39;ve defined an object that uses Petsc (what I&#39;m calling the GmresSolver<br>
&gt; class), and the object compiles just fine.  However, when it comes time to<br>
&gt; compile the driver (Laplace.cc) and link to Petsc libraries, I see a bunch<br>
&gt; of &quot;Undefined symbol&quot; errors.<br>
&gt;<br>
&gt; In my object code that uses Petsc (GmresSolver.h), I have included the Petsc<br>
&gt; header file as:<br>
&gt; extern &quot;C&quot; {<br>
&gt; #include &quot;petscksp.h&quot;<br>
&gt; }<br>
&gt;<br>
&gt; In the driver (Laplace.cc), depending on how I include the Petsc header<br>
&gt; file, I get different errors.  If I include it like I do in GmresSolver.h,<br>
&gt; extern &quot;C&quot; {<br>
&gt; #include &quot;petsc.h&quot;<br>
&gt; }<br>
&gt;<br>
&gt; I get a whole slew of header file syntax errors (see postscript of email).<br>
&gt; If I just include the header file,<br>
&gt; #include &quot;petsc.h&quot;<br>
&gt;<br>
&gt; then I get the undefined symbols problem (more below).<br>
&gt;<br>
&gt;<br>
&gt; My configure line for Petsc is<br>
&gt; Users/charles/pkg/petsc-2.3.3-p15/config/configure.py \<br>
&gt;    --prefix=$HOME/pkg/petsc-2.3.3-p15 \<br>
&gt;    --with-python \<br>
&gt;    --with-mpi=0 \<br>
&gt;    --with-debugging=1 \<br>
&gt;    PETSC_DIR=$HOME/pkg/petsc-2.3.3-p15<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Here&#39;s my step-by-step to produce the error:<br>
&gt;<br>
&gt; 1. Compile all non-Petsc object code<br>
&gt;<br>
&gt; 2. Compile object code that uses Petsc using this command:<br>
&gt;<br>
&gt; g++ -c -Wall  -I.  -I/Users/charles/pkg/petsc-2.3.3-p15<br>
&gt; -I/Users/charles/pkg/petsc-2.3.3-p15/bmake/darwin9.5.0-c-opt<br>
&gt; -I/Users/charles/pkg/petsc-2.3.3-p15/include ./GmresSolver.<br>
&gt;<br>
&gt; (as mentioned, this works fine.)<br>
&gt;<br>
&gt; 3. Compile the driver, &quot;Laplace.cc&quot;, and link it to Petsc&#39;s libraries:<br>
&gt;<br>
&gt; g++  \<br>
&gt;  -I/Users/charles/pkg/petsc-2.3.3-p15/  \<br>
&gt;  -I/Users/charles/pkg/petsc-2.3.3-p15/include  \<br>
&gt;  -I/Users/charles/pkg/petsc-2.3.3-p15/include/mpiuni  \<br>
&gt;  -I/Users/charles/pkg/petsc-2.3.3-p15/include/petsc \<br>
&gt;  -DPETSC_STATIC_INLINE=&quot;&quot;  \<br>
&gt;  Laplace.cc  \<br>
&gt;  -L/Users/charles/pkg/petsc-2.3.3-p15 \<br>
&gt;  -L/Users/charles/pkg/petsc-2.3.3-p15/lib/darwin9.5.0-c-opt \<br>
&gt;  -lpetscts -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc \<br>
&gt;  BoundaryConditionFactory.o  BoundaryCondition.o Field.o FileIO.o<br>
&gt; GmresSolver.o JacobiSolver.o Timer.o TimerFactory.o<br>
&gt;<br>
&gt; (Note: I don&#39;t know why I need -DPETSC_STATIC_INLINE=&quot;&quot;, but I do, otherwise<br>
&gt; I see a bunch of errors like &quot;petsc-2.3.3-p15/include/petscviewer.h:117:<br>
&gt; error: ‘PETSC_STATIC_INLINE’ does not name a type&quot; - anyone know what that&#39;s<br>
&gt; all about?)<br>
&gt;<br>
&gt; This last compiler command gives the undefined symbols errors:<br>
&gt;<br>
&gt; Undefined symbols:<br>
&gt;   &quot;PetscOptionsGetReal(char const*, char const*, double*, PetscTruth*)&quot;,<br>
&gt; referenced from:<br>
&gt;       PetscOptionsGetReal(char const*, double*, PetscTruth*)in ccPG7mg3.o<br>
&gt;   &quot;_Petsc_MPI_Abort&quot;, referenced from:<br>
&gt;       _PetscMaxSum_Local in libpetsc.a(pinit.o)<br>
&gt;       _PetscADMax_Local in libpetsc.a(pinit.o)<br>
&gt;       _PetscADMin_Local in libpetsc.a(pinit.o)<br>
&gt;       _PetscSynchronizedFlush in libpetsc.a(mprint.o)<br>
&gt;       _PetscSynchronizedFlush in libpetsc.a(mprint.o)<br>
&gt;       _PetscOptionsCheckInitial_Private in libpetsc.a(init.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscError in libpetsc.a(err.o)<br>
&gt;       _PetscMallocDumpLog in libpetsc.a(mtr.o)<br>
&gt;       _PetscSequentialPhaseBegin_Private in libpetsc.a(mpiu.o)<br>
&gt;       _PetscSequentialPhaseEnd_Private in libpetsc.a(mpiu.o)<br>
&gt;       _PetscSignalHandler_Private in libpetsc.a(signal.o)<br>
&gt;       _PetscSignalHandler_Private in libpetsc.a(signal.o)<br>
&gt;       _PetscDefaultSignalHandler in libpetsc.a(signal.o)<br>
&gt;       _PetscMPIAbortErrorHandler in libpetsc.a(errstop.o)<br>
&gt;       _PetscDefaultFPTrap in libpetsc.a(fp.o)<br>
&gt;   &quot;_Petsc_MPI_Comm_dup&quot;, referenced from:<br>
&gt;       _PetscFinalize in libpetsc.a(pinit.o)<br>
&gt;       _PetscSequentialPhaseBegin in libpetsc.a(mpiu.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;   &quot;_Petsc_MPI_Init&quot;, referenced from:<br>
&gt;       _PetscInitialize in libpetsc.a(pinit.o)<br>
&gt;   &quot;PetscOptionsGetTruth(char const*, char const*, PetscTruth*,<br>
&gt; PetscTruth*)&quot;, referenced from:<br>
&gt;       PetscOptionsGetTruth(char const*, PetscTruth*, PetscTruth*)in<br>
&gt; ccPG7mg3.o<br>
&gt;   &quot;PetscInitialize(int*, char***, char const*, char const*)&quot;, referenced<br>
&gt; from:<br>
&gt;       PetscInitialize(int*, char***)in ccPG7mg3.o<br>
&gt;       _main in ccPG7mg3.o<br>
&gt;   &quot;_MPIUNI_TMP&quot;, referenced from:<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in ccPG7mg3.o<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(pinit.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(mprint.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(init.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(options.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(plog.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(mpinit.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(err.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(mtr.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(mpiu.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(verboseinfo.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(adebug.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(binv.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(filev.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(eventLog.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(view.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(pdisplay.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(tagm.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(mpiuopen.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(draw.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(sysio.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(pbarrier.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(dupl.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(fretrieve.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(send.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(dscatter.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(petscvu.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(axis.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(random.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(drawv.o)<br>
&gt;       _MPIUNI_TMP$non_lazy_ptr in libpetsc.a(lg.o)<br>
&gt;   &quot;PetscOptionsGetScalar(char const*, char const*, double*, PetscTruth*)&quot;,<br>
&gt; referenced from:<br>
&gt;       PetscOptionsGetScalar(char const*, double*, PetscTruth*)in ccPG7mg3.o<br>
&gt;   &quot;_Petsc_MPI_Keyval_create&quot;, referenced from:<br>
&gt;       _PetscViewerASCIIGetStdout in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIGetStderr in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIOpen in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscSequentialPhaseBegin in libpetsc.a(mpiu.o)<br>
&gt;       _PETSC_VIEWER_BINARY_ in libpetsc.a(binv.o)<br>
&gt;       _PetscViewerDestroy_ASCII in libpetsc.a(filev.o)<br>
&gt;       _PetscCommGetNewTag in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommGetNewTag in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommGetNewTag in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscSharedTmp in libpetsc.a(fretrieve.o)<br>
&gt;       _PetscSharedWorkingDirectory in libpetsc.a(fretrieve.o)<br>
&gt;       _PETSC_VIEWER_SOCKET_ in libpetsc.a(send.o)<br>
&gt;       _PETSC_VIEWER_DRAW_ in libpetsc.a(drawv.o)<br>
&gt;   &quot;_Petsc_MPI_Attr_delete&quot;, referenced from:<br>
&gt;       _PetscSequentialPhaseEnd in libpetsc.a(mpiu.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;   &quot;_Petsc_MPI_Attr_get&quot;, referenced from:<br>
&gt;       _PetscViewerASCIIGetStdout in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIGetStderr in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIOpen in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIOpen in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscSequentialPhaseEnd in libpetsc.a(mpiu.o)<br>
&gt;       _PETSC_VIEWER_BINARY_ in libpetsc.a(binv.o)<br>
&gt;       _PetscViewerDestroy_ASCII in libpetsc.a(filev.o)<br>
&gt;       _PetscCommGetNewTag in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommGetNewTag in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;       _PetscSharedTmp in libpetsc.a(fretrieve.o)<br>
&gt;       _PetscSharedWorkingDirectory in libpetsc.a(fretrieve.o)<br>
&gt;       _PETSC_VIEWER_SOCKET_ in libpetsc.a(send.o)<br>
&gt;       _PETSC_VIEWER_DRAW_ in libpetsc.a(drawv.o)<br>
&gt;   &quot;_Petsc_MPI_Attr_put&quot;, referenced from:<br>
&gt;       _PetscViewerASCIIGetStdout in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIGetStderr in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIOpen in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscViewerASCIIOpen in libpetsc.a(vcreatea.o)<br>
&gt;       _PetscSequentialPhaseBegin in libpetsc.a(mpiu.o)<br>
&gt;       _PETSC_VIEWER_BINARY_ in libpetsc.a(binv.o)<br>
&gt;       _PetscViewerDestroy_ASCII in libpetsc.a(filev.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscCommDuplicate in libpetsc.a(tagm.o)<br>
&gt;       _PetscSharedTmp in libpetsc.a(fretrieve.o)<br>
&gt;       _PetscSharedWorkingDirectory in libpetsc.a(fretrieve.o)<br>
&gt;       _PETSC_VIEWER_SOCKET_ in libpetsc.a(send.o)<br>
&gt;       _PETSC_VIEWER_DRAW_ in libpetsc.a(drawv.o)<br>
&gt;   &quot;PetscOptionsGetString(char const*, char const*, char*, unsigned long,<br>
&gt; PetscTruth*)&quot;, referenced from:<br>
&gt;       PetscOptionsGetString(char const*, char*, unsigned long,<br>
&gt; PetscTruth*)in ccPG7mg3.o<br>
&gt;   &quot;_Petsc_MPI_Finalize&quot;, referenced from:<br>
&gt;       _PetscFinalize in libpetsc.a(pinit.o)<br>
&gt;       _Petsc_MPI_DebuggerOnError in libpetsc.a(init.o)<br>
&gt;       _PetscAttachDebuggerErrorHandler in libpetsc.a(adebug.o)<br>
&gt;   &quot;PetscOptionsGetRealArray(char const*, char const*, double*, int*,<br>
&gt; PetscTruth*)&quot;, referenced from:<br>
&gt;       PetscOptionsGetRealArray(char const*, double*, int*, PetscTruth*)in<br>
&gt; ccPG7mg3.o<br>
&gt;   &quot;PetscOptionsGetInt(char const*, char const*, int*, PetscTruth*)&quot;,<br>
&gt; referenced from:<br>
&gt;       PetscOptionsGetInt(char const*, int*, PetscTruth*)in ccPG7mg3.o<br>
&gt;   &quot;PetscViewerCreate(int, _p_PetscViewer**)&quot;, referenced from:<br>
&gt;       PetscViewerCreate(_p_PetscViewer**)      in ccPG7mg3.o<br>
&gt;   &quot;_Petsc_MPI_Comm_free&quot;, referenced from:<br>
&gt;       _PetscFinalize in libpetsc.a(pinit.o)<br>
&gt;       _PetscSequentialPhaseEnd in libpetsc.a(mpiu.o)<br>
&gt;       _PetscCommDestroy in libpetsc.a(tagm.o)<br>
&gt;   &quot;PetscFinalize()&quot;, referenced from:<br>
&gt;       _main in ccPG7mg3.o<br>
&gt;   &quot;PetscOptionsHasName(char const*, char const*, PetscTruth*)&quot;, referenced<br>
&gt; from:<br>
&gt;       PetscOptionsHasName(char const*, PetscTruth*)in ccPG7mg3.o<br>
&gt;   &quot;PetscOptionsGetStringArray(char const*, char const*, char**, int*,<br>
&gt; PetscTruth*)&quot;, referenced from:<br>
&gt;       PetscOptionsGetStringArray(char const*, char**, int*, PetscTruth*)in<br>
&gt; ccPG7mg3.o<br>
&gt;   &quot;_MPIUNI_Memcpy&quot;, referenced from:<br>
&gt;       _PetscMaxSum in libpetsc.a(pinit.o)<br>
&gt;       _PetscFinalize in libpetsc.a(pinit.o)<br>
&gt;       _PetscGlobalMax in libpetsc.a(pinit.o)<br>
&gt;       _PetscGlobalMin in libpetsc.a(pinit.o)<br>
&gt;       _PetscGlobalSum in libpetsc.a(pinit.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintSummary in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscLogPrintDetailed in libpetsc.a(plog.o)<br>
&gt;       _PetscIntView in libpetsc.a(err.o)<br>
&gt;       _PetscIntView in libpetsc.a(err.o)<br>
&gt;       _PetscIntView in libpetsc.a(err.o)<br>
&gt;       _PetscIntView in libpetsc.a(err.o)<br>
&gt;       _PetscRealView in libpetsc.a(err.o)<br>
&gt;       _PetscRealView in libpetsc.a(err.o)<br>
&gt;       _PetscRealView in libpetsc.a(err.o)<br>
&gt;       _PetscRealView in libpetsc.a(err.o)<br>
&gt;       _PetscScalarView in libpetsc.a(err.o)<br>
&gt;       _PetscScalarView in libpetsc.a(err.o)<br>
&gt;       _PetscScalarView in libpetsc.a(err.o)<br>
&gt;       _PetscScalarView in libpetsc.a(err.o)<br>
&gt;       _PetscSharedTmp in libpetsc.a(fretrieve.o)<br>
&gt;       _PetscSharedWorkingDirectory in libpetsc.a(fretrieve.o)<br>
&gt;   &quot;_Petsc_MPI_Initialized&quot;, referenced from:<br>
&gt;       _PetscInitialize in libpetsc.a(pinit.o)<br>
&gt;   &quot;PetscOptionsGetIntArray(char const*, char const*, int*, int*,<br>
&gt; PetscTruth*)&quot;, referenced from:<br>
&gt;       PetscOptionsGetIntArray(char const*, int*, int*, PetscTruth*)in<br>
&gt; ccPG7mg3.o<br>
&gt;   &quot;PetscSequentialPhaseBegin(int, int)&quot;, referenced from:<br>
&gt;       PetscSequentialPhaseBegin(int)  in ccPG7mg3.o<br>
&gt;       PetscSequentialPhaseBegin()     in ccPG7mg3.o<br>
&gt;   &quot;PetscSequentialPhaseEnd(int, int)&quot;, referenced from:<br>
&gt;       PetscSequentialPhaseEnd(int)  in ccPG7mg3.o<br>
&gt;       PetscSequentialPhaseEnd()     in ccPG7mg3.o<br>
&gt; ld: symbol(s) not found<br>
&gt; collect2: ld returned 1 exit status<br>
&gt;<br>
&gt; Is this a problem with my libpetsc.a?  Or is this problem because another<br>
&gt; library is broken or not being linked to?  Any insight into this problem<br>
&gt; would be greatly appreciated.  After several hours of trying to figure this<br>
&gt; out I feel like I&#39;m lost at sea.<br>
&gt;<br>
&gt;<br>
&gt; Charles<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Postscript:<br>
&gt;<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h: In function<br>
&gt; ‘PetscErrorCode PetscViewerCreate(_p_PetscViewer**)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h:117: error:<br>
&gt; declaration of C function ‘PetscErrorCode<br>
&gt; PetscViewerCreate(_p_PetscViewer**)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h:116: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscViewerCreate(MPI_Comm,<br>
&gt; _p_PetscViewer**)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h: In function<br>
&gt; ‘PetscErrorCode PetscViewerCreate(_p_PetscViewer**)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h:117: error: invalid<br>
&gt; conversion from ‘int’ to ‘_p_PetscViewer**’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h:117: error: too<br>
&gt; many arguments to function ‘PetscErrorCode<br>
&gt; PetscViewerCreate(_p_PetscViewer**)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscviewer.h:117: error: at this<br>
&gt; point in file<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsHasName(const char*, PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:10: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsHasName(const char*,<br>
&gt; PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:9: error: previous<br>
&gt; declaration ‘PetscErrorCode PetscOptionsHasName(const char*, const char*,<br>
&gt; PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsHasName(const char*, PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:10: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscTruth*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsHasName(const char*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetInt(const char*, PetscInt*, PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:12: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetInt(const char*,<br>
&gt; PetscInt*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:11: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetInt(const char*, const<br>
&gt; char*, PetscInt*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetInt(const char*, PetscInt*, PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:12: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscInt*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetInt(const char*, PetscInt*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetTruth(const char*, PetscTruth*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:14: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetTruth(const char*,<br>
&gt; PetscTruth*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:13: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetTruth(const char*, const<br>
&gt; char*, PetscTruth*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetTruth(const char*, PetscTruth*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:14: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscTruth*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetTruth(const char*, PetscTruth*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetReal(const char*, PetscReal*, PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:16: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetReal(const char*,<br>
&gt; PetscReal*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:15: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetReal(const char*, const<br>
&gt; char*, PetscReal*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetReal(const char*, PetscReal*, PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:16: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscReal*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetReal(const char*, PetscReal*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetScalar(const char*, PetscScalar*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:18: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetScalar(const char*,<br>
&gt; PetscScalar*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:17: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetScalar(const char*,<br>
&gt; const char*, PetscScalar*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetScalar(const char*, PetscScalar*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:18: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscScalar*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetScalar(const char*, PetscScalar*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetIntArray(const char*, PetscInt*, PetscInt*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:20: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetIntArray(const<br>
&gt; char*, PetscInt*, PetscInt*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:19: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetIntArray(const char*,<br>
&gt; const char*, PetscInt*, PetscInt*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetIntArray(const char*, PetscInt*, PetscInt*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:20: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscInt*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetIntArray(const char*, PetscInt*, PetscInt*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetRealArray(const char*, PetscReal*, PetscInt*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:22: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetRealArray(const<br>
&gt; char*, PetscReal*, PetscInt*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:21: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetRealArray(const char*,<br>
&gt; const char*, PetscReal*, PetscInt*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetRealArray(const char*, PetscReal*, PetscInt*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:22: error: cannot<br>
&gt; convert ‘const char*’ to ‘PetscReal*’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetRealArray(const char*, PetscReal*, PetscInt*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetString(const char*, char*, size_t,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:24: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetString(const char*,<br>
&gt; char*, size_t, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:23: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetString(const char*,<br>
&gt; const char*, char*, size_t, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetString(const char*, char*, size_t,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:24: error: invalid<br>
&gt; conversion from ‘const char*’ to ‘char*’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:24: error: invalid<br>
&gt; conversion from ‘char*’ to ‘size_t’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:24: error: invalid<br>
&gt; conversion from ‘size_t’ to ‘PetscTruth*’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:24: error: too<br>
&gt; many arguments to function ‘PetscErrorCode PetscOptionsGetString(const<br>
&gt; char*, char*, size_t, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:24: error: at this<br>
&gt; point in file<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetStringArray(const char*, char**, PetscInt*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:26: error:<br>
&gt; declaration of C function ‘PetscErrorCode PetscOptionsGetStringArray(const<br>
&gt; char*, char**, PetscInt*, PetscTruth*)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:25: error:<br>
&gt; previous declaration ‘PetscErrorCode PetscOptionsGetStringArray(const char*,<br>
&gt; const char*, char**, PetscInt*, PetscTruth*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h: In function<br>
&gt; ‘PetscErrorCode PetscOptionsGetStringArray(const char*, char**, PetscInt*,<br>
&gt; PetscTruth*)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petscoptions.h:26: error: cannot<br>
&gt; convert ‘const char*’ to ‘char**’ for argument ‘2’ to ‘PetscErrorCode<br>
&gt; PetscOptionsGetStringArray(const char*, char**, PetscInt*, PetscTruth*)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscInitialize(int*, char***)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1160: error: declaration<br>
&gt; of C function ‘PetscErrorCode PetscInitialize(int*, char***)’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1159: error: previous<br>
&gt; declaration ‘PetscErrorCode PetscInitialize(int*, char***, const char*,<br>
&gt; const char*)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscInitialize(int*, char***)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1160: error: too many<br>
&gt; arguments to function ‘PetscErrorCode PetscInitialize(int*, char***)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1160: error: at this<br>
&gt; point in file<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1347: error: declaration<br>
&gt; of C function ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’ conflicts<br>
&gt; with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1346: error: previous<br>
&gt; declaration ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm,<br>
&gt; PetscMPIInt)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1347: error: too many<br>
&gt; arguments to function ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1347: error: at this<br>
&gt; point in file<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseBegin()’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1348: error: declaration<br>
&gt; of C function ‘PetscErrorCode PetscSequentialPhaseBegin()’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1347: error: previous<br>
&gt; declaration ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1348: error: too many<br>
&gt; arguments to function ‘PetscErrorCode PetscSequentialPhaseBegin()’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1348: error: at this<br>
&gt; point in file<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseBegin(MPI_Comm)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1350: error: declaration<br>
&gt; of C function ‘PetscErrorCode PetscSequentialPhaseEnd(MPI_Comm)’ conflicts<br>
&gt; with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1349: error: previous<br>
&gt; declaration ‘PetscErrorCode PetscSequentialPhaseEnd(MPI_Comm, PetscMPIInt)’<br>
&gt; here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseEnd(MPI_Comm)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1350: error: too many<br>
&gt; arguments to function ‘PetscErrorCode PetscSequentialPhaseEnd(MPI_Comm)’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1350: error: at this<br>
&gt; point in file<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseEnd()’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1351: error: declaration<br>
&gt; of C function ‘PetscErrorCode PetscSequentialPhaseEnd()’ conflicts with<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1350: error: previous<br>
&gt; declaration ‘PetscErrorCode PetscSequentialPhaseEnd(MPI_Comm)’ here<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h: In function<br>
&gt; ‘PetscErrorCode PetscSequentialPhaseEnd(MPI_Comm)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1351: error: too many<br>
&gt; arguments to function ‘PetscErrorCode PetscSequentialPhaseEnd()’<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1351: error: at this<br>
&gt; point in file<br>
&gt; Laplace.cc: In function ‘int main(int, char**)’:<br>
&gt; /Users/charles/pkg/petsc-2.3.3-p15/include/petsc.h:1160: error: too many<br>
&gt; arguments to function ‘PetscErrorCode PetscInitialize(int*, char***)’<br>
&gt; Laplace.cc:206: error: at this point in file<br>
&gt;<br>
&gt;<br>
&gt; This last error doesn&#39;t even make sense, as it conforms to the usage<br>
&gt; specified here (<br>
&gt; <a href="http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/Sys/PetscInitialize.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/Sys/PetscInitialize.html</a><br>




&gt; ).<br>
&gt; </div></div></blockquote></div><br>