From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Mar 14 2011 - 16:22:58 CDT

Susana,
  You need a space between "-ltcl8.5" and "-L/usr/lib/", they are
separate command parameters. You may need to edit your makefile
to add spaces where necessary.

Cheers,
  John

On Mon, Mar 14, 2011 at 09:04:51PM +0000, Susana Tomasio wrote:
> Hi Axel,
>
> Thank you for your reply.
> Your are right it doesn't complain about -lstdc++. But now it complains
> about -ltcl8.5:
>
> ld: library not found for -ltcl8.5-L/usr/lib/
> collect2: ld returned 1 exit status
> make: *** [tester] Error 1
>
> Is it also related with the space between the words?
> (Sorry I don't have experience with this sort of thing).
>
> Thank you,
>
> Susana
>
> On Mon, Mar 14, 2011 at 6:43 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
> wrote:
>
> On Mon, Mar 14, 2011 at 12:52 PM, Susana Tomasio
> <susietomasio_at_gmail.com> wrote:
> > Hi all,
> >
> > I'm compiling the fortran bindings for the VMD molfile plugins from
> Axel
> > Kohlmeyer.
> >
> > I've compiled the molfile plugins but I am having a linkage problem
> when
> > compliling the
> > fortran bindings. I am using a MacOSX Snow Leopard.
>
> [...]
> > ld: library not found for -ltcl8.5-L/usr/lib/-lstdc++
>
> have a look at this error message.
> it doesn't look right as a library name, or does it?
> > collect2: ld returned 1 exit status
> > make: *** [tester] Error 1
> >
> > And this is the edit section of my Makefile:
> >
> > ARCH = MACOSX86-64
> > ARCHDIR = /Users/tomasio/plugins/MACOSXX86/molfile
> > FC = g77
> > #FC = g77
> > #-fno-second-underscore
> > CC = gcc
> > LD = $(FC)
> > OPT = -O2 -Wall
> > CPPFLAGS = -I/Users/tomasio/plugins/include/
> > -I/Users/tomasio/plugins/MACOSXX86 #
> > -D_F77_F2C_UNDERSCORE
> > CFLAGS = -c $(CPPFLAGS) $(OPT)
> > FFLAGS = -c $(OPT)
> > NETCDFLIB =
> >
> -L/opt/local/var/macports/software/netcdf/4.1.1_4+dap+netcdf4/opt/local/lib/
> > #/usr/lib64/netcdf-3
> > NETCDFLDFLAGS = -lnetcdf
> > TCLLIB =
> /opt/local/var/macports/software/tcl/8.5.9_0/opt/local/lib/
> > TCLLDFLAGS = -ltcl8.5
> > LDFLAGS = -L$(ARCHDIR) $(TCLLIB) $(NETCDFLIB)
> > LDLIBS = -lmolfile_plugin $(NETCDFLDFLAGS)
> > $(TCLLDFLAGS)-L/usr/lib/-lstdc++ -ldl
>
> here is the problem. there have to be blanks between the "words", i.e.
> try:
> $(TCLLDFLAGS) -L/usr/lib/ -lstdc++ -ldl
>
> cheers,
> axel.
> >
> > I tried with gfortran and got the same error.
> > I would be grateful if anyone could help me with this.
> >
> > Thank you,
> >
> > Susana
> >
>
> --
> Dr. Axel Kohlmeyer
> akohlmey_at_gmail.com http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078