The demo of the interface can be found in the directory /templates/
f77.
in the Makefile demo.mak you have to add
-L/usr/lib -lgfortran
to the linkflags
I renamed demo.mak to Makefile then the demo can be compiled by the 2
commands
gfortran - c demo.f
make -f demo.mak
Regards
emil
Copy Paste the changed Makefile in case you need it
------------------------------------------------------------------------
#!/bin/sh
# This Makefile builds a Fortran 77 application that uses Cantera. By
# default, the main program file is 'demo.f,' which prints out some
# properties of a reacting gas mixture. It uses the library
# 'demo_ftnlib.cpp,' which contains Fortran-callable functions that
# are implemented with C++ calls to Cantera.
# To build program 'demo', simply type 'make', or 'make -f <this
# file>' if this file is named something other than 'Makefile.'
# Once you have verified that the demo runs, edit this file to replace
# object file 'demo.o' with your own object file or files. You may
# continue to use 'demo_ftnlib' if it serves your needs, or else
# replace it with a different interface library.
#------------------------ edit this block
---------------------------------
# the name of the executable program to be created
PROG_NAME = demo
# the object files to be linked together.
OBJS = $(PROG_NAME).o demo_ftnlib.o
# additional flags to be passed to the linker. If your program
# requires other external libraries, put them here
LINK_OPTIONS = -L/usr/lib -lgfortran
#---------------------------------------------------------------------------
# You probably don't need to edit anything below.
# the Fortran compiler
FORT = gfortran
# Fortran compile flags
FORT_FLAGS = -O3
# Fortran libraries
FORT_LIBS =
# the C++ compiler
CXX = g++
# C++ compile flags
CXX_FLAGS = -O3 -Wall
# external libraries
EXT_LIBS = -luser -loneD -lzeroD -lcaThermo -ltransport -lcantera -
lsundials_cvodes -lsundials_nvecserial -lctlapack -lctblas -lctmath -
ltpx -lctf2c -lconverters -lctcxx
# the directory where the Cantera libraries are located
CANTERA_LIBDIR=/usr/local/cantera/lib
# the directory where Cantera include files may be found.
CANTERA_INCDIR=/usr/local/cantera/include
# flags passed to the C++ compiler/linker for the linking step
LCXXFLAGS = -L$(CANTERA_LIBDIR) -L/root/my-applications/Cantera/
cantera-1.7.0/build/lib/i686-pc-linux-gnu -L/usr/local/lib
# how to compile C++ source files to object files
.cpp.o:
$(CXX) -c $< -I$(CANTERA_INCDIR) $(CXX_FLAGS) -L/usr/lib -lgfortran
# how to compile Fortran source files to object files
.f.o:
$(FORT) -c $< $(FORT_FLAGS) -L/usr/lib -lgfortran
PROGRAM = $(PROG_NAME)$(EXE_EXT)
DEPENDS = $(OBJS:.o=.d)
all: $(PROGRAM)
$(PROGRAM): $(OBJS)
$(CXX) -v -o $(PROGRAM) $(OBJS) $(LCXXFLAGS) $(CANTERA_LIBS) $
(LINK_OPTIONS) $(EXT_LIBS) $(FORT_LIBS)
%.d:
$(CXX) -v -MM $*.cpp > $*.d
clean:
$(RM) $(OBJS) $(PROGRAM)
depends: $(DEPENDS)
cat *.d > .depends
$(RM) $(DEPENDS)
TAGS:
etags *.h *.cpp
ifeq ($(wildcard .depends), .depends)
include .depends
endif
--
You received this message because you are subscribed to the Google Groups "Cantera User's Group" group.
To post to this group, send email to canter...@googlegroups.com.
To unsubscribe from this group, send email to cantera-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cantera-users?hl=en.
> 2010/1/22 emil <emil.widm...@gmail.com>
> > cantera-user...@googlegroups.com<cantera-users%2Bunsu...@googlegroups.com>