Thread: [Mysql-cocoa-users] Re: SMySQL
Brought to you by:
sergecohen
|
From: Serge C. <ser...@us...> - 2003-11-30 16:58:52
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Jonathan,=0D =0D As other mails send today, sorry for answering this late, I guess you =0D= gathered the info you were looking for somewhere else already, in the =0D= opposite case (and also to help future users facing the same pb, and =0D= looking in archives)... The solution is to run ranlib on the =0D libmysqlclient.a that is distributed with the code:=0D =0D in the terminal, cd to the directory where libmysqlclient.a stands and =0D= issue:=0D =0D ranlib libmysqlclient.a=0D =0D That should do.=0D =0D Serge.=0D =0D =0D Le 13 nov. 03, =C3=A0 03:59, Jonathan McGuire a =C3=A9crit :=0D =0D > Hi,=0D >=0D > So I know how to program in Cocoa and would love to try and help you =0D= > out. Unfortunently my understanding of building the this framework so = =0D > I can use it is lacking. Guess I need to learn more about how building = =0D > and stuff work. Anyways when I try to build the 2.2.1 src files from =0D= > the dmg I get a error about the InfoPlist.strings file being missing. = =0D > After unchecking that file form the build list i get these warnings =0D= > and 1 error.=0D >=0D > Building target =E2=80=9CSMySQL_static=E2=80=9D with build style = =E2=80=9CDevelopment=E2=80=9D =0D > (optimization:level =E2=80=980=E2=80=99, debug-symbols:on) =E2=80=94 = (1 error, 5 warnings)=0D > /usr/bin/gcc-3.3 -c =0D > -F/Users/jonathan/Desktop/SMySQL_src_2.2.1/build =0D > -I/Users/jonathan/Desktop/SMySQL_src_2.2.1/build/include -Imysql_bins = =0D > -arch ppc -fno-common -fpascal-strings -O0 -Wmost =0D > -Wno-four-char-constants -Wno-unknown-pragmas -pipe =0D > "-fmessage-length=3D0" -g -pg =0D > -Wp,-header-mapfile,/Users/jonathan/Desktop/SMySQL_src_2.2.1/build/ =0D= > SMySQL.build/SMySQL_static.build/SMySQL_static.hmap "-faltivec" =0D= > "-fno-coalesce" MCPConnection.m -o =0D > /Users/jonathan/Desktop/SMySQL_src_2.2.1/build/SMySQL.build/ =0D > SMySQL_static.build/Objects-normal/ppc/MCPConnection.o=0D > MCPConnection.m:164:2: warning: #warning What happens when inited =0D > twice the NSObject?=0D > MCPConnection.m:197:2: warning: #warning What happens when inited =0D > twice the NSObject?=0D > MCPConnection.m:259:2: warning: #warning What to do if one of the =0D > string is a nil pointer?=0D > MCPConnection.m:305:2: warning: #warning Should throw an exception, =0D= > illegal string pointer (nil)=0D > MCPConnection.m:164:2: warning: #warning What happens = when inited =0D > twice the NSObject?=0D > MCPConnection.m:197:2: warning: #warning What happens = when inited =0D > twice the NSObject?=0D > MCPConnection.m:259:2: warning: #warning What to do if = one of the =0D > string is a nil pointer?=0D > MCPConnection.m:305:2: warning: #warning Should throw an = exception, =0D > illegal string pointer (nil)=0D > /usr/bin/gcc-3.3 -o =0D > /Users/jonathan/Desktop/SMySQL_src_2.2.1/build/ =0D > SMySQL_static.framework/Versions/A/SMySQL_static =0D > "-L/Users/jonathan/Desktop/SMySQL_src_2.2.1/build" "-Lmysql_bins" =0D= > "-F/Users/jonathan/Desktop/SMySQL_src_2.2.1/build" -filelist =0D > /Users/jonathan/Desktop/SMySQL_src_2.2.1/build/SMySQL.build/ =0D > SMySQL_static.build/Objects-normal/LinkFileList "-lmysqlclient" =0D > "-framework" "Cocoa" "-lz.1.1.3" "-arch" "ppc" "-prebind" =0D > "-Wl,-single_module" "-dynamiclib" "-compatibility_version" "2.0.0" =0D= > "-current_version" "2.2.1" "-pg" "-seg1addr" "0x08800000" =0D > -install_name "`echo =0D > "~/Library/Frameworks/SMySQL_static.framework/Versions/A/ =0D > SMySQL_static" | /usr/bin/sed 's!//*!/!g'`"=0D > ld: table of contents for archive: mysql_bins/libmysqlclient.a is out = =0D > of date; rerun ranlib(1) (can't load from it)=0D > ld: warning prebinding disabled because dependent library: =0D > /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit can't be = =0D > searched=0D > /usr/bin/libtool: internal link edit command failed=0D > ld: table of contents for archive: = mysql_bins/libmysqlclient.a is =0D > out of date; rerun ranlib(1) (can't load from it)=0D > ld: warning prebinding disabled because dependent = library: =0D > /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit can't be = =0D > searched=0D >=0D > I'd really like to try out your frame work but I can't figure out how = =0D > to get a project setup using it :( guess I need to reread some of my =0D= > Cocoa books. I'm using panther and Xcode and I have mysql installed on = =0D > my system (I used the mysql package offered by the MySQL site).=0D >=0D > Jonathan=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQE/yiG+5EPeG5y7WPsRAhwLAKDTWMOdG+HPhuPmgJH+sCHHaDDGQwCg+f46 FwzsodASZ5dPUo20J996Kds=3D =3DdDI2 -----END PGP SIGNATURE----- |
|
From: Serge C. <ser...@us...> - 2004-03-04 21:44:32
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi;=0D
=0D
I have couple of program using SMySQL, but all have been started with =0D=
PB, so none of those are native Xcode project... hence my errors in the =
=0D
mail you are speaking of...=0D
=0D
'Hopefully' you are not the first person to raise this question (the =0D=
previous was also off-list... that's why I'd better have this one on =0D=
list).=0D
=0D
Make a copy phase in the build, then drag the framework on the copy =0D
phase icon (on the file/target... pane on the left of the project =0D
window). Open info of the copy phase, select Frameworks in the top =0D
pulldown menu, set path to / and unselect the copy only on install. =0D
This should do the trick.=0D
=0D
I just got your email n3 now...=0D
I have some miss spelling in the web doc... I've corrected it now, but =0D=
still have to update the web page, here come the 'corrected' version of =
=0D
the example code:=0D
=0D
{=0D
MCPConnection *theConnec =3D [MCPConnection alloc];=0D
MCPResult *theRes;=0D
NSDictionary *theDict;=0D
NSArray *theColNames;=0D
int i, j;=0D
=0D
theConnec =3D [theConnec initToHost:@"albert.com" =
withLogin:@"toto" =0D
password:@"albert" usingPort:0];=0D
[theConnec selectDB:@"db1"];=0D
theRes =3D [theConnec queryString:@"select * from table1"];=0D
theColNames =3D [theRes fetchFiedlsName];=0D
i =3D 0;=0D
while (theDict =3D [theRes fetchRowAsDictionary]){=0D
NSLog(@"Row : %d\n", i);=0D
for (j=3D0; j<[theColNames count]; j++) {=0D
NSLog(@" Field : %@, contain : %@\n", [theColNames =0D
objectAtIndex:j], [theDict objectForKey:[theColNames =0D
objectAtIndex:j]]);=0D
}=0D
i++;=0D
}=0D
}=0D
=0D
=0D
Serge.=0D
=0D
PS: note it is not old documentation with API change, but miss type in =0D=
the doc (even worth...)!=0D
=0D
Le 4 mars 04, =E0 21:19, in...@gr... a =E9crit :=0D
=0D
> hi!=0D
>=0D
> Sorry, now I have found the developers mailinglist archive!=0D
>=0D
> I have reat this:=0D
>=0D
> http://sourceforge.net/mailarchive/forum.php? =0D
> thread_id=3D3929987&forum_id=3D2800=0D
>=0D
> And Your answer. But there is one point that does not work:=0D
>=0D
> In this build phase you should make the destination 'Frameworks', and=0D=
> drag/drop the framework icon (from the left pane in Xcode file list) =
to=0D
> the path text-field. This will make Xcode copy the framework in the=0D
> frameworks folder of your application bundle.=0D
>=0D
> THIS IS NOT POSSIBLE IN Xcode!=0D
> You can try it with the project which I have uploaded on my site.=0D
> In Xcode you can't drag&drop the framework from the list at the left =0D=
> site into the new COPY FILE PHASE.=0D
>=0D
> Is this a problem with my Xcode installation or what?=0D
>=0D
> Thank you!=0D
>=0D
> iChat: gr...@ma...=0D
> e-mail: ga...@gr...=0D
> website: http://www.gritsch-soft.com=0D
> <gritsch-soft.png>=0D
- ----------------------------------------------------=0D
Serge Cohen=0D
=0D
GPG Key ID: 9CBB58FB=0D
- ----------------------------------------------------=0D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAR5/S5EPeG5y7WPsRAuC/AJ0b8tU8WssM5EdMZQv8mH2RmcvMOACgv4QA
ymNBDcJGJb9KBHJmKfrIxaI=3D
=3DduKZ
-----END PGP SIGNATURE-----
|
|
From: Serge C. <ser...@us...> - 2004-03-10 20:54:49
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi;=0D =0D The version of the library that I'm using for the bundled (and static) =0D= version of the framework are compiled with SSL support.=0D =0D The framework itself is linked to libssl and libcrypto.=0D =0D Still, I've not tried it myself, so I'm not completely sure of how it =0D= would work. I was thinking of trying that for a while, so I prepared =0D= the method to tell the library to use SSL connection (but have not =0D tried it yet).=0D =0D You should look at the documentation here :=0D =0D http://mysql-cocoa.sourceforge.net/SMySQL_doc/MCPConnection.html#- =0D %20setConnectionOption:toValue:=0D =0D Use a option of CLIENT_SSL and a value of YES.=0D =0D I've not tried it because I'd like to be sure that the connection is =0D= only accepted if the client is using SSL... and there is always trouble = =0D for setting properly SSL on both sides for the certificates being =0D accepted...=0D =0D I'm curious of whatever result you can have, can you please send this =0D= back to me or the list?=0D =0D =0D Serge.=0D =0D Le 10 mars 04, =E0 20:22, in...@gr... a =E9crit :=0D =0D > hi!=0D >=0D > Sorry!=0D >=0D > My qeuestion was not to use SSH. I want to use SSL on a socket or so!=0D= >=0D > I have the apple-documentation for you on my server.=0D >=0D > is it possible to edit the framework in some parts uding the commands = =0D > "SSLread" and "SSLwrite" to write to the socket?=0D >=0D > http://www.gritsch-soft.com/secureTransportRef.zip=0D >=0D >=0D > Thank you!=0D >=0D >=0D > iChat: gr...@ma...=0D > e-mail: ga...@gr...=0D > website: http://www.gritsch-soft.com=0D > <gritsch-soft.png>=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFAT3xm5EPeG5y7WPsRAqftAJ9yELlx9oVrI2kSxkwcBZibCAIB9ACfd7t5 XWtijVFFalUHvI6j1Z/cyeQ=3D =3Drjl6 -----END PGP SIGNATURE----- |
|
From: Serge C. <ser...@us...> - 2004-03-10 21:00:03
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Yorh;=0D =0D My guess is that you are using the wrong version of the framework, =0D maybe you want to read the README explaining the different versions of =0D= the framework. =46rom the error message I guess you are including =0D (#import) SMySQL.h... which relies on mysql to be existing on your =0D system (by itself).=0D Rather you should use SMySQ_static (#import =0D <SMySQ_static/SMySQ_static.h>) or even more likely SMySQL_bundled =0D (#import <SMySQL_bundled/SMySQL_bundled.h>). For this later, Dave =0D Winter have send a PDF explaining (with screen shot and examples...) =0D= how to use SMySQL_bundled to the user mailing list; if you think you =0D= need this version I very much encourage you to read this PDF.=0D =0D Looking forward to your feed-back.=0D =0D Serge.=0D =0D =0D Le 10 mars 04, =E0 19:41, Yorh a =E9crit :=0D =0D > Hi Serge,=0D >=0D > I'm trying your sMySQL framework...=0D > I have a little problem. When I try to include in some headers your =0D= > framework the compiler returns me an error that says:=0D >=0D > "/Users/andreasalomoni/Library/Frameworks/SMySQL.framework/Headers/ =0D= > MCPConnection.h:28:18: mysql.h: No such file or directory"=0D >=0D > I really don't know where is the problem (because mysql.h is included = =0D > in your framework...)=0D > Thank you very for your support!=0D >=0D > Think Different!=0D > Yorh=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFAT32g5EPeG5y7WPsRArypAKCJnbKoST49PbHdLB50WN8ES5XOMQCfVrcC 0IkYxRDeGYNa/yTCUZHJGaA=3D =3DhL2d -----END PGP SIGNATURE----- |