From: Susana Tomasio (susietomasio_at_gmail.com)
Date: Tue Mar 01 2011 - 10:16:18 CST

Hi,

I'm trying to compile the Fortran bindings for the VMD molfile plugins of
Axel Kohlmeyer on a MacOSX Snow Leopard.
I have edited the Makefile to include the architecture and the c and fortran
compilers. I also edited NETCDFLIB to include the location
of netcdf.
This is how the config section of my Makefile looks like:

########################################################################

ARCH = MACOSX86-64
ARCHDIR = /Applications/VMD\ 1.8.7.app/Contents/vmd/plugins/include/
FC = g77
#FC = g77
#-fno-second-underscore

CC = gcc
LD = $(FC)
OPT = -O2 -Wall
CPPFLAGS = -I../../include -I$(ARCHDIR) #
-D_F77_F2C_UNDERSCORE
CFLAGS = -c $(CPPFLAGS) $(OPT)
FFLAGS = -c $(OPT)
NETCDFLIB = -L/opt/local/var/macports/software/netcdf/
#/usr/lib64/netcdf-3
NETCDFLDFLAGS = -lnetcdf
TCLLIB =
TCLLDFLAGS = -ltcl8.4
LDFLAGS = -L$(ARCHDIR) $(TCLLIB) $(NETCDFLIB)
LDLIBS = -lmolfile_plugin $(NETCDFLDFLAGS) $(TCLLDFLAGS) -lstdc++
-ldl
########################################################################

I also copied the files molfile_plugin.h, vmdplugin.h and
libmolfile_plugin.h to my working directory.

When I typed "make" I got the following:

g77 -c -O2 -Wall tester.f -o tester.o
gcc -c -I../../include -I/Applications/VMD\
1.8.7.app/Contents/vmd/plugins/include/ -O2 -Wall f77_molfile.c -o
f77_molfile.o
g77 -o tester -L/Applications/VMD\ 1.8.7.app/Contents/vmd/plugins/include/
-L/opt/local/var/macports/software/netcdf/ tester.o f77_molfile.o
-lmolfile_plugin -lnetcdf -ltcl8.4 -lstdc++ -ldl
ld: library not found for -lmolfile_plugin
collect2: ld returned 1 exit status
make: *** [tester] Error 1

I don't understand this error. It looks like it cannot find
-lmolfile_plugin. But I don't think that there is such file.

I would be grateful if anyone could help me with this.

Thank you.

Kind regards,

Susana