[Mysql-cocoa-users] Re: SMySQL Installation
Brought to you by:
sergecohen
|
From: Rob P. <ro...@in...> - 2003-09-07 02:35:01
|
Hello Serge, Thank you for taking the time to reply, I really appreciate it. I am attempting to connect to a remote MySQL server, not localhost. So=20= I'm assuming I shouldn't use the "SMySQL.framework" flavor. (I am a=20 newbie to Cocoa, but I've worked with other programming languages.) I have copied the _static frameworks to "/Library/Frameworks", and=20 changed my header file in Project Builder to "#import=20 <SMySQL_static/SMySQL.h>". Then when building, I received the following=20= errors: /Library/Frameworks/SMySQL_static.framework/Headers/SMySQL.h:30: header=20= file 'SMySQL/SMySQLConstants.h' not found /Library/Frameworks/SMySQL_static.framework/Headers/SMySQL.h:31: header=20= file 'SMySQL/MCPNull.h' not found /Library/Frameworks/SMySQL_static.framework/Headers/SMySQL.h:32: header=20= file 'SMySQL/MCPResult.h' not found /Library/Frameworks/SMySQL_static.framework/Headers/SMySQL.h:33: header=20= file 'SMySQL/MCPConnection.h' not found /Library/Frameworks/SMySQL_static.framework/Headers/SMySQL.h:34: header=20= file 'SMySQL/MCPResultPlus.h' not found /Library/Frameworks/SMySQL_static.framework/Headers/SMySQL.h:35: header=20= file 'SMySQL/MCPFastQueries.h' not found appController.h:10: undefined type, found `SMySQLConnection' <built-in>:1:1: no macro name given in #define directive I simply changed the file paths from "SMySQL/" to "SMySQL_static/".=20 That got rid of those problems. However, now I get these errors: appController.h:10: undefined type, found `SMySQLConnection' In file included from appController.m:2: appController.h:10: parse error before "SMySQLConnection" appController.m:7: `mySQLConnection' undeclared (first use in this=20 function) appController.m:7: (Each undeclared identifier is reported only once appController.m:7: for each function it appears in.) appController.m:7: `SMySQLConnection' undeclared (first use in this=20 function) How can I fix this? Thanks, Rob P. On Saturday, September 6, 2003, at 08:35 PM, Serge Cohen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Rob; > > First let me mention one resource that you can use when you have such=20= > a problem; the mailing list mys...@li... > = ... > The advantages are two fold: > - - First (for you), you might get there faster and better support=20 > (because I'm not the only one to answer, and someone is likely to=20 > already have to confront the problem you're facing and knows the way=20= > around) > - - Second (for others), the list is archived, so if anything=20 > interesting comes out of the exchange, it can be found by future users=20= > of the framework. > > .... that's said, I'm very happy to receive your feedback, and be=20 > assured I'll try my best to help you with getting the framework to=20 > work. > > As far as I can understand, you are using the binary distribution. And=20= > from this you are trying to use the SMySQL.framework (and not the=20 > _static nor the _bundled version)... please tell me if I'm wrong here=20= > (in which case you can ignore the following of the mail). > > If you are using SMySQL.framework, you need to have=20 > libmysqlclient.dylib installed in /usr/local/lib/mysql, and the=20 > corresponding headers (one of which is mysql.h) in=20 > /usr/local/include/mysql/. These files are NOT part of my=20 > distribution, you have to install MySQL to get them. > > If you don't have MySQL installed, and are only interested by the=20 > client side of MySQL, the easiest is then to use the=20 > SMySQL_static.framework, which comes with it's own libmysqlclient=20 > library and the appropriate headers. Place it in /Library/Frameworks=20= > for example and use it by importing the header: > #import <SMySQL_static/SMySQL.h> > > Last, if you are developing a GUI application, I would strongly=20 > encourage you to use the SMySQL_bundled version of the framework. > > > I hope, my message is clear (I'm not a native English speaker, and I'm=20= > afraid to have been more confusing than helping). > DO NOT hesitate to go on mailing me (or even better : the list). > > Serge. > > Le samedi, 6 sep 2003, =E0 22:24 Europe/Amsterdam, Rob Payne a =E9crit = : > >> Hello Serge, >> >> I am trying to develop a personal Cocoa application which requires=20 >> MySQL. I understand that I need to use the SMySQL frameworks to do=20 >> this. However, when I try to use the standard "SMySQL.framework"=20 >> flavor, I get a bunch of errors saying "header file 'mysql.h' not=20 >> found". I was not able to find the mysql.h file in framework folder.=20= >> I have SMySQL.framework stored in /Library/Frameworks. >> >> Honestly, I've spent hours reading through files and documentations=20= >> trying to fix this, and contacting you is my last resort. I have a=20 >> feeling I'm missing something obvious. Any suggestions? >> >> Regards, >> >> Rob P. >> ro...@in... >> >> >> > - ---------------------------------------------------- > Serge Cohen > > GPG Key ID: 9CBB58FB > - ---------------------------------------------------- > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (Darwin) > > iD8DBQE/Wn1Z5EPeG5y7WPsRAj5OAKDKgoqtp/QfNKXviV/VVvJGdj4WxQCg/O6K > F2t38AXtqqMLSQc8wgVfUhs=3D > =3D0uxq > -----END PGP SIGNATURE----- > > > > |