Hi,
I am trying to get CocoaMySQL running in my XCode. So I created an
easy application to query my database. In the Controller.m file I
added the line:
#import <MCPKit_bundled/MCPKit_bundled.h>
CODE:
______________________________________
MCPConnection * mySQLConnection = [[MCPConnection alloc]
initToHost:@"localhost" withLogin:@"root" password:@"password"
usingPort:3306];
MCPResult * mySQLResult;
if ([mySQLConnection isConnected]) {
if([mySQLConnection selectDB:@"myDBName"]) {
mySQLResult = [mySQLConnection queryString:@"INSERT
INTO 'mytable'
VALUES (1,'FOO')"];
} else {
NSLog(@"Could not select DB");
}
} else {
NSLog(@"Could not establish connection");
}
______________________________________
This code won't compile and give me the error:
Linking
/Users/developer/Desktop/Projects/Test/Debug/Test.app/Contents/MacOS/Test
(1 error)
".objc_class_name_MCPConnection", referenced from:
literal [EMAIL PROTECTED]@[EMAIL PROTECTED] in Controller.o
symbol(s) not found
collect2: Idreturned 1 exit status
Build failed (1 error)
I had a similar error once when using the AddressBook Framework and
was able to resolve that by myself, but I don't remember how. Could
you please give me a hint what I'm doing wrong.
Thankyou,
Sebastian.
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]