AMBER Archive (2009)

Subject: Re: [AMBER] problem building AmberTools/sleap on AIX

From: Shan-ho Tsai (tsai_at_hal.physast.uga.edu)
Date: Mon Jan 12 2009 - 09:31:51 CST


Hi Wei,
Thank you very much for your response. I made the change
in src/gleap/mortsrc/nablib/Makefile that you suggested
and recompiled. I am getting an error compiling memutil.c.
The error message is:

g++ -c -Dflex -DMORT -O3 -DBINTRAJ -o memutil.o memutil.c
In file included from memutil.c:4:
nab.h:219: error: expected ',' or '...' before '&' token
nab.h:219: error: ISO C++ forbids declaration of 'molecule_t'
with no type
gmake[2]: *** [memutil.o] Error 1

---------------------------------------------
Line 219 in nab.h is

double molsurf(const molecule_t&, double, bool verbose=false );

I got this error using either g++ 3.3.2 or 4.1.2.

Thank you!
Shan-Ho

On Fri, 9 Jan 2009, Wei Zhang wrote:

> Hi,
>
> It looks like due to C++ name mangling, maybe because we use gcc to
> compile c source
> code, but use g++ to compile c++ code and link them together.
>
> Can you try the following:
>
> find file amber10/src/gleap/mortsrc/nablib/Makefile. Change line 3 to 4
> from:
>
> .c.o:
> $(CC) -c -Dflex -DMORT $(OCFLAGS) -o $@ $<
>
> to
> .c.o:
> $(CXX) -c -Dflex -DMORT $(OCFLAGS) -o $@ $<
>
> then recompile. This will make sure c code will also compiled by c++
> compiler.
>
> Sincerely,
>
> Wei
>
>

_______________________________________________
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber