undefined reference to

Waad Subber w_subber at yahoo.com
Sun Aug 19 12:27:38 CDT 2007


Hello everyone

I am calling a subroutine from my main program, and when I compile the code I get an error message  (undefined reference to 'mvec_') referring to the call statement in the main program. I have defined the subroutine as external in the main program using (external mvec), but the problem still unsolved ..! 

The makefile looks like:

OBJS= mvec.o
CFLAGS        = 
FFLAGS        = 
CPPFLAGS        =
FPPFLAGS        =


include ${PETSC_DIR}/bmake/common/base

all: $(OBJS)

mvec.o: mvec.F
    mpif90 -c mvec.F

exe: pro.o $(OBJS) 
    -${FLINKER} -o exe pro.o $(OBJS)  ${PETSC_LIB}
     ${RM} -f pro.o

include ${PETSC_DIR}/bmake/common/test

Can any one help me with this issue please ...!

Thanks

Waad

       
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20070819/ea406748/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile
Type: application/octet-stream
Size: 294 bytes
Desc: 3428916206-makefile
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20070819/ea406748/attachment.obj>


More information about the petsc-users mailing list