Sorry, I made a mistake. I have a.C file with the same name in the current
directory. When I remove it, the compiler can be passed.
It seems that ${CLINKER} can automatically identify the extension of files
and compile them with different compilers.
Thanks for helping me.
Yingjie
Balay, Satish
Please send complete logs. [i.e the complete compile output from your makefile.
Also send your makefile]
If your c++ code uses .cxx - it should get compiled with a c++ compiler.
You might benefit by change CLINKER to CXXLINKER
Satish
On Wed, 24 Oct 2018, Yingjie Wu wrote:
> Thank you very
Thank you very much for your reply.
Because the files I added are written in c++, including definitions of
classes and functions. I encountered a mistake when I used your method.
myprogram: class1.o myprogram.o
${CLINKER} -o myprogram class1.o myprogram.o ${PETSC_LIB}
Error information is
Correction:
OBJFILES = \
class1.o \
class2.o \
myprogram.o
Matt Overholt
On Tue, Oct 23, 2018 at 2:29 PM Matthew Overholt
wrote:
> Here is a sample makefile, like what I use with the Intel MPI compilers
> (used during PETSc configuration) and MKL library.
>
> Matt Overholt
>
>
Here is a sample makefile, like what I use with the Intel MPI compilers
(used during PETSc configuration) and MKL library.
Matt Overholt
-
#
# makefile for Linux using the Intel C++ Compiler, MKL & MPI libraries +
OpenMP
# usage: make
# or: make
On Tue, Oct 23, 2018 at 11:37 AM Yingjie Wu wrote:
> Dear Petsc developer:
> Hi,
> Thank you very much for your continuous help, I recently encountered some
> difficulties in developing programs on Petsc.
>
> 1. I want to use my class definition (class1. h) and class functions
> (class1. cpp)
Dear Petsc developer:
Hi,
Thank you very much for your continuous help, I recently encountered some
difficulties in developing programs on Petsc.
1. I want to use my class definition (class1. h) and class functions
(class1. cpp) files in my Petsc program (myprogram. c) and compile my
program. I