Hi Vahe

Am 11.01.2015 um 12:00 schrieb fpc-pascal-requ...@lists.freepascal.org:

> Message: 4
> Date: Sat, 10 Jan 2015 16:48:52 +0000 (UTC)
> From: Vahe Sahakyan <vahe.sahak...@yahoo.com>
> To: "fpc-pascal@lists.freepascal.org"
>       <fpc-pascal@lists.freepascal.org>
> Subject: [fpc-pascal] fpc2.6.4 compilation problem
> Message-ID:
>       
> <238177706.217828.1420908532346.javamail.ya...@jws10688.mail.bf1.yahoo.com>
>       
> Content-Type: text/plain; charset="utf-8"
> 
> 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

As much as I know, the missing symbol ___powisf2 is part of the fortran 
library, libgfortran, which should be in /sw/lib/gcc4.9/lib/. Maybe check, 
whether this is really the case. 
Secondly, how does the linker get the information to link libgfortran? Through 
a linklib directive? If not, you may have to use the fpc options "-k 
-lgfortran" to pass the information to the linker.

Passing -vt or even -va will give you further (in case of -va a huge amount) of 
information building your program. I do not expect any difference between 2.4.0 
and 2.6.*. I am using 2.6.4 on 10.9 in combination with gfortran and it works 
well.

Michael.

P.S. can you somehow achieve, to send a plain text email. The way you did it 
results in a very hard to read output.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to