XCode - 导入 Sedna 库
我必须在 XCode 中做什么才能包含 Sedna(本机 XML DB)库?
这些文件是:
/usr/local/sedna/driver/c/libsedna.h
/usr/local/sedna/driver/c/libsedna.dylib
我尝试放置这些路径(/usr/local/sedna/driver/c)在“搜索路径”->“用户标题搜索路径”上什么也没有。
代码:
#include <stdio.h>
#include "libsedna.h"
struct SednaConnection conn = SEDNA_CONNECTION_INITIALIZER;
const char* url = "localhost";
const char* db_name = "databasename";
const char* login = "SYSTEM";
const char* password = "MANAGER";
int main (int argc, const char * argv[]) {
int res;
//connecting to database "testdb" with login "SYSTEM", password "MANAGER"
res = SEconnect(&conn, url, db_name, login, password);
if(res != SEDNA_SESSION_OPEN)
{
printf("Session starting failed: \n%s\n", SEgetLastErrorMsg(&conn));
return -1;
}
printf("Connection ok!");
return 0;
}
谢谢
What you I have to do in XCode to include the Sedna (Native XML DB) libs?
The files are:
/usr/local/sedna/driver/c/libsedna.h
/usr/local/sedna/driver/c/libsedna.dylib
I try to puts these path (/usr/local/sedna/driver/c) on "Search Paths"->"User Header Search Paths" and nothing.
Code:
#include <stdio.h>
#include "libsedna.h"
struct SednaConnection conn = SEDNA_CONNECTION_INITIALIZER;
const char* url = "localhost";
const char* db_name = "databasename";
const char* login = "SYSTEM";
const char* password = "MANAGER";
int main (int argc, const char * argv[]) {
int res;
//connecting to database "testdb" with login "SYSTEM", password "MANAGER"
res = SEconnect(&conn, url, db_name, login, password);
if(res != SEDNA_SESSION_OPEN)
{
printf("Session starting failed: \n%s\n", SEgetLastErrorMsg(&conn));
return -1;
}
printf("Connection ok!");
return 0;
}
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需以与添加源文件相同的方式将它们添加到项目中 - 从 Finder 拖动到项目窗口或使用“添加到项目”菜单选项并导航到库。 (提示:在文件导航对话框中使用 Shift-Command-G 转到特定目录,例如 /usr/local/lib)
Just add them to the project in the same way that you add source files - either drag from Finder to project window or use the Add to Project menu option and navigate to the library. (Hint: Use Shift-Command-G in file navigation dialog to go to a specific directory such as /usr/local/lib)