<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Here is the head of the unit:<div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(14, 134, 0); ">{ </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(14, 134, 0); "> cMySQL.pas</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(14, 134, 0); "> cape61</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(14, 134, 0); min-height: 13px; "> Created by Paul Davidson on 2005/01/18.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(14, 134, 0); "> Copyright (c) 2005 Corax Networks.Inc.. All rights reserved.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(14, 134, 0); ">}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span style="color: #b61aa3">unit</span> cMySQL;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span class="Apple-style-span" style="color: rgb(14, 134, 0); "><span style="color: #000000"> </span>{$I Directives.inc}</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span class="Apple-style-span" style="color: rgb(182, 26, 163); ">interface</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span class="Apple-style-span" style="color: rgb(14, 134, 0); "><span style="color: #000000"> </span>{$linklib libmysqlclient.a}</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span class="Apple-style-span" style="color: rgb(182, 26, 163); "><span style="color: #000000"> </span>uses</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> cBase,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> cKey,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> cStack,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> mysql<span style="color: #3e00d8">4</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">Using MySQL 41</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">Some linker output:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">ld: warning: in /Users/pauldavidson/dev/cape96/libmysqlclient.a, file is not of required architecture</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">Undefined symbols:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> "_mysql_get_host_info", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__GETHOSTINFO$$ANSISTRING in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> "_mysql_free_result", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__QUERYLOCAL$ANSISTRING$$ANSISTRING in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> "_mysql_close", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__DESTROY in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> "_mysql_error", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__REALCONNECT$$BOOLEAN in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__QUERYBATCH$ANSISTRING$$ANSISTRING in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__QUERYLOCAL$ANSISTRING$$ANSISTRING in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> "_mysql_store_result", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "> _CMYSQL_TCCMYSQLMGR_$__QUERYLOCAL$ANSISTRING$$ANSISTRING in cMySQL.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px Menlo; min-height: 13.0px">It goes on...</p><div>Do note the 'file is not of required architecture'. Ummm????</div><div><br></div><div><br></div><div>Thank you</div><div><br></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div><div>On 2009-10-15, at 10:27 AM, Jonas Maebe wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On 15 Oct 2009, at 16:03, Paul Davidson wrote:<br><br><blockquote type="cite">On 2009-10-15, at 7:13 AM, Jonas Maebe wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">On 14 Oct 2009, at 18:14, Paul Davidson wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">FPC 2.2.4<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">OS X 10.6.1<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Xcode 3.2<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">All references to MySQL function are unresolved by linker. libMySQLclient.a is copied to .pas directory. Using FPC test code for MySQL as template.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">When you use Xcode, you have to use the Xcode way to link with libraries: add the library to your project, then add the library to the "Link binary with Libraries" phase of your application target.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">Added libmysqlclient.a to the project and it gets automatically included in Tagets/cape96/Link Binary With Libraries. Again same linker errors: Symbols not found. Also tried libmysqlclient.la. Same result.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When looking at examples and tests in FPC for MySQL they do not contain any references to this library.<br></blockquote><br>When you compile outside Xcode, any {$linklib xxx} statements in the (mysql or other) units you use will automatically cause the compiler to tell the linker to link with the specified libraries. So if those units already include {$linklib mysqlclient}, it's not required to explicitly also tell the program to link against it. This changes if you move to Xcode, because Xcode itself does all the linking and there is no way (that I know of) for the compiler to tell it "please also link against these libraries in addition to those specified in the project".<br><br>But you are leaving out important information, such as which mysql unit you are using exactly and which version the libmysqlclient.a comes from. Most examples use the dynamic versions of the mysql units, which means that the mysqlclient library is dynamically loaded at run time rather than statically linked (in which case no linklib statement or other linker instructions are required). Please also mention some example symbols that are reported as being missing, and post the linker step of the Xcode build transcript (select the error on the build transcript and right-click on to see the full tool invocation/output).<br><br><br>Jonas<br>_______________________________________________<br>fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br><a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br></div></blockquote></div><br></div></body></html>