Dear Matt,<br><br>Thank you for your answer. My problem was that I needed help with the makefiles because I was not having success when compiling a program with multiple C++ files using PETSc and SLEPc.<br>In addition, I was trying to write a makefile distinguishing between compilation and linking (not to write everything in the same makefile sentence).To do it, I was trying to &quot;guess&quot; the correct variables  to be used for the case of PETSc + SLEPc  in order to specify: compilation options, include folders locations and library locations (${PETSC_INCLUDE}, ${SLEPC_LIB},${SLEPC_INCLUDE} ...). And which of them should be used when compiling and which others to be used when linking. I do not really understand what a PETSc or SLEPc makefile is doing and so often I am lost when I wish to modify something.<br>
<br>Dear Jose,<br><br>Thank you very much for your email and makefile example. Now I can compile the code.<br><br>Best regards,<br><br>Jordi Poblet-Puig    <br><br><br><br><div class="gmail_quote">On Mon, Sep 6, 2010 at 1:29 PM, Jose E. Roman <span dir="ltr">&lt;<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
El 06/09/2010, a las 13:01, jordi poblet escribió:<br>
<div><div></div><div class="h5"><br>
&gt; Dear all,<br>
&gt;<br>
&gt; I am trying to use PETSc and SLEPc but I have problems with the makefiles. Could someone provide me an example of makefiles that compiles multiple C++ files and include external libraries different than PETSc and SLEPc?<br>

&gt;<br>
&gt; In the makefile that I am trying to use (attached):<br>
&gt;<br>
&gt; -main.cpp: is the main file where some tests are done<br>
&gt; -UsePETSc.cpp: A class that uses PETSc<br>
&gt; -UseSLEPc.cpp: A class that uses SLEPc<br>
&gt;<br>
&gt; I have no problem when using UsePETSc.cpp without SLEPc or when compiling single examples that call SLEPc functions (with the makefiles provided in the SLEPc examples).<br>
&gt; Sorry if this is not a purelly PETSc question but I have supposed that there is someone else here using also SLEPc.<br>
&gt;<br>
&gt; Thank you very much in advance,<br>
&gt;<br>
&gt; Jordi Poblet-Puig<br>
&gt;<br>
<br>
</div></div>Probably you need to add ${PETSC_INCLUDE} also to the UseSLEPc.o target. Anyway, your makefile does not seem to be well formed. Try the following:<br>
<br>
CFLAGS     = -I../MyIncludefiles -Wno-deprecated<br>
MYLIB      = -L../MyLibraries -lMyLibrary<br>
MYOBJS     = main.o UseSLEPc.o UsePETSc.o<br>
EXE        = MyExecutableFile<br>
<br>
all: ${EXE}<br>
<br>
include ${SLEPC_DIR}/conf/slepc_common<br>
<br>
${EXE}: ${MYOBJS} chkopts<br>
        -${CLINKER} -o ${EXE} ${MYOBJS} ${MYLIB} ${SLEPC_LIB}<br>
        ${RM} ${MYOBJS}<br>
<br>
<br>
<br>
</blockquote></div><br>