XCode won't build - Error while Linking CocoaMySQL MCPKit_bundled
XCode won't build - Error while Linking CocoaMySQL MCPKit_bundled
- Subject: XCode won't build - Error while Linking CocoaMySQL MCPKit_bundled
- From: "Sebastian Pape" <email@hidden>
- Date: Tue, 4 Nov 2008 08:46:05 +0100
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 pointer@_OBJC@_cls_refs@MCPConnection 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@hidden)
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:
This email sent to email@hidden