<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">Hello,</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">I have some difficulties to compile my PASCAL code with external </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">subroutine in FORTRAN on MAC OS X Yosemite 10.10.1 using fpc 2.6.4.</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">The problem is the following: I need to run the program in Pascal </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">containing the external procedure in FORTRAN which uses the standard </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">CERNLIB packages such as libpacklib. </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">In the attached please find the code in PASCAL (as an example) with </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">external procedure on FORTRAN which I’m training to compile. The names </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">of these two programs are: “exmppas.p” and “exmpfrt.f”, and for </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">compilation I'm using the following commands:</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">$ gfortran -c exmpfrt.f</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">$ fpc exmppas.p -Fl/sw/lib/gcc4.9/lib</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">where with the -Fl/sw/lib/gcc4.9/lib I link the required libraries which </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">I use in my code. But I get the following error:</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""> </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><span style="font-family: Menlo; font-size: 11px;" class="" id="yui_3_16_0_1_1420907895799_2502">Free Pascal Compiler version 2.6.4 [2015/01/09] for x86_64</span></div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2503">Copyright (c) 1993-2014 by Florian Klaempfl and others</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2504">Target OS: Darwin for x86_64</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2505">Compiling exmppas.p</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2506">Assembling (pipe) exmppas.s</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2507">Linking exempts</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2508">Undefined symbols for architecture x86_64:</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2509"> "___powisf2", referenced from:</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2510"> _hbin_ in libpacklib.a(hbin.o)</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2511">ld: symbol(s) not found for architecture x86_64</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2512">An error occurred while linking </div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2513">exmppas.p(15) Error: Error while linking</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2514">exmppas.p(15) Fatal: There were 1 errors compiling module, stopping</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2515">Fatal: Compilation aborted</div>
<div style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;" class="" id="yui_3_16_0_1_1420907895799_2516">Error: /sw/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">I'm using fpc 2.4.6.</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">Please note I have tried the same things on MAC OS X Maverick 10.9.5 </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">using fpc 2.4.0 and it works without any problems .</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">I cannot figure out what is the problem. My be in this new version for </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">linking libraries I should use another command or I have done mistake </div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">somewhere else?</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">Can someone help to solve the problems?</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">Thank you in advance.</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">Best regards,</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style="">Vahe</div><div id="yui_3_16_0_1_1420907895799_2363" dir="ltr" class="" style=""><br class="" style=""></div></div></body></html>