[fpc-pascal] fpc2.6.4 compilation problem

Vahe Sahakyan vahe.sahakyan at yahoo.com
Sat Jan 10 17:48:52 CET 2015


Hello,
I have some difficulties to compile my PASCAL code with external subroutine in FORTRAN on MAC OS X Yosemite 10.10.1 using fpc 2.6.4.
The problem is the following: I need to run the program in Pascal containing the external procedure in FORTRAN which uses the standard CERNLIB packages such as libpacklib.  
In the attached please find the code in PASCAL (as an example) with external procedure on FORTRAN which I’m training to compile. The names of these two programs are: “exmppas.p”  and “exmpfrt.f”, and for compilation I'm using the following commands:
$ gfortran -c exmpfrt.f$ fpc exmppas.p -Fl/sw/lib/gcc4.9/lib
where with the -Fl/sw/lib/gcc4.9/lib I link the required libraries which I use in my code. But I get the following error: Free Pascal Compiler version 2.6.4 [2015/01/09] for x86_64Copyright (c) 1993-2014 by Florian Klaempfl and othersTarget OS: Darwin for x86_64Compiling exmppas.pAssembling (pipe) exmppas.sLinking exemptsUndefined symbols for architecture x86_64:  "___powisf2", referenced from:      _hbin_ in libpacklib.a(hbin.o)ld: symbol(s) not found for architecture x86_64An error occurred while linking exmppas.p(15) Error: Error while linkingexmppas.p(15) Fatal: There were 1 errors compiling module, stoppingFatal: Compilation abortedError: /sw/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
I'm using fpc 2.4.6.Please note I have tried the same things on MAC OS X Maverick 10.9.5 using fpc 2.4.0 and it works without any problems .
I cannot figure out what is the problem. My be in this new version for linking libraries I should use another command or I have done mistake somewhere else?Can someone help to solve the problems?
Thank you in advance.Best regards,Vahe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150110/76e03390/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exmppas.p
Type: application/octet-stream
Size: 242 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150110/76e03390/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exmpfrt.f
Type: application/octet-stream
Size: 662 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150110/76e03390/attachment-0001.obj>


More information about the fpc-pascal mailing list