When you start the project with Oracle Class Library you should include ocl.h header
from ocl/include directory to your project and link it with ocl.lib from ocl/lib directory.
#include "ocl.h"
Before using OCL classes you can include whole ocl namespace
.....
../ocl/lib 下面有个 ocl.a 文件 !
这是我照着写的
#include <stdio.h>
#include "ocl.h"
using namespace ocl;
main()
{
};
编译:
[root@prince engineer_rh]# gcc -g -Wall rh_conn.c -locl
In file included from ocl.h:14,
from rh_conn.c:9:
crdef.h:34:18: string: 没有那个文件或目录
crdef.h:35:18: vector: 没有那个文件或目录
crdef.h:40:23: exception: 没有那个文件或目录
In file included from ocl.h:14,
from rh_conn.c:9:
crdef.h:56: error: syntax error before "ocl"
crdef.h:56: error: syntax error before '{' token
crdef.h:61: error: syntax error before "std"
crdef.h:67: error: syntax error before ':' token
crdef.h:69: warning: type defaults to `int' in declaration of `string'
crdef.h:69: error: syntax error before '&' token
crdef.h:82: error: syntax error before "const"
crdef.h:82: error: syntax error before ')' token
crdef.h:86: error: syntax error before "const"
crdef.h:101: error: syntax error before "CRException"
crdef.h:106: warning: type defaults to `int' in declaration of `message'
crdef.h:106: warning: data definition has no type or storage class
crdef.h:107: warning: type defaults to `int' in declaration of `CRString'
crdef.h:107: error: syntax error before '&' token
crdef.h:109: error: syntax error before "const"
crdef.h: In function `what':
crdef.h:109: warning: type defaults to `int' in declaration of `throw'
crdef.h:111: error: syntax error before "protected"
crdef.h:158: error: syntax error before "class"
crdef.h:164: error: syntax error before "const"
crdef.h:166: error: syntax error before "const"
crdef.h:168: error: syntax error before "const"
crdef.h:170: error: syntax error before "const"
crdef.h:172: error: syntax error before "const"
crdef.h:174: error: syntax error before "const"
[root@prince engineer_rh]#
ctrl+c 强制结束的,本还有更多的错误!